Package hec.model
Class ModelVariable
java.lang.Object
hec.model.ModelVariable
- All Implemented Interfaces:
AsciiSerializable,FieldAccessor,Serializable,Cloneable,Comparable
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionModelVariable(int type, String objectType, String name, String nqual, int paramId, int dataId) ModelVariable(int type, String objectType, String name, String nqual, int paramId, int dataId, boolean required) ModelVariable(int type, String objectType, String name, String nqual, int paramId, int dataId, boolean required, String unitStr, String unitTypeStr) ModelVariable(String objectType, String name, int type, int paramId) -
Method Summary
Modifier and TypeMethodDescriptionclone()intbooleanequals(ModelVariable mv) basic equality test.intgetFieldObject(Field fld) This method allows access to java.lang.reflect.Field objects within the implementing class.getName()intdoubleintintgetType()intbooleanbooleanread(BufferedReader reader) booleansetFieldObject(Field fld, Object fobj) This allows access to fields withing the implementing object to set there data.voidsetPriority(double priority) voidsetScaleIndex(int idx) voidvoidvoidsetViewportIndex(int idx) toString()booleanwrite(BufferedWriter writer)
-
Field Details
-
MODEL_VARIABLE_BEGIN
- See Also:
-
-
Constructor Details
-
ModelVariable
public ModelVariable() -
ModelVariable
-
ModelVariable
-
ModelVariable
-
ModelVariable
-
-
Method Details
-
equals
basic equality test.- Parameters:
mv-- Returns:
- true if name, object type, type id, and param id are equal
-
isRequired
public boolean isRequired() -
getNameQualifier
-
getDataSetId
public int getDataSetId() -
getName
-
getType
public int getType() -
getObjectType
-
getParamId
public int getParamId() -
toString
-
getViewportIndex
public int getViewportIndex() -
setViewportIndex
public void setViewportIndex(int idx) -
getScaleIndex
public int getScaleIndex() -
setScaleIndex
public void setScaleIndex(int idx) -
getUnitString
-
setUnitString
-
getUnitTypeString
-
setUnitTypeString
-
write
- Throws:
IOException
-
read
- Throws:
IOException
-
setPriority
public void setPriority(double priority) -
getPriority
public double getPriority() -
compareTo
- Specified by:
compareToin interfaceComparable
-
clone
-
getFieldObject
Description copied from interface:FieldAccessorThis method allows access to java.lang.reflect.Field objects within the implementing class.- Specified by:
getFieldObjectin interfaceFieldAccessor- Parameters:
fld- The field to get.- Returns:
- The data object that is stored in the given field
-
setFieldObject
Description copied from interface:FieldAccessorThis allows access to fields withing the implementing object to set there data.- Specified by:
setFieldObjectin interfaceFieldAccessor- Parameters:
fld- The java field object representing the member field to be setfobj- The data to set in that field- Returns:
- returns true if successful
-