Package hec.model

Class ModelVariable

java.lang.Object
hec.model.ModelVariable
All Implemented Interfaces:
AsciiSerializable, FieldAccessor, Serializable, Cloneable, Comparable

public class ModelVariable extends Object implements Comparable, Cloneable, AsciiSerializable
See Also:
  • Field Details

  • Constructor Details

    • ModelVariable

      public ModelVariable()
    • ModelVariable

      public ModelVariable(String objectType, String name, int type, int paramId)
    • ModelVariable

      public ModelVariable(int type, String objectType, String name, String nqual, int paramId, int dataId)
    • ModelVariable

      public ModelVariable(int type, String objectType, String name, String nqual, int paramId, int dataId, boolean required)
    • ModelVariable

      public ModelVariable(int type, String objectType, String name, String nqual, int paramId, int dataId, boolean required, String unitStr, String unitTypeStr)
  • Method Details

    • equals

      public boolean equals(ModelVariable mv)
      basic equality test.
      Parameters:
      mv -
      Returns:
      true if name, object type, type id, and param id are equal
    • isRequired

      public boolean isRequired()
    • getNameQualifier

      public String getNameQualifier()
    • getDataSetId

      public int getDataSetId()
    • getName

      public String getName()
    • getType

      public int getType()
    • getObjectType

      public String getObjectType()
    • getParamId

      public int getParamId()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getViewportIndex

      public int getViewportIndex()
    • setViewportIndex

      public void setViewportIndex(int idx)
    • getScaleIndex

      public int getScaleIndex()
    • setScaleIndex

      public void setScaleIndex(int idx)
    • getUnitString

      public String getUnitString()
    • setUnitString

      public void setUnitString(String s)
    • getUnitTypeString

      public String getUnitTypeString()
    • setUnitTypeString

      public void setUnitTypeString(String s)
    • write

      public boolean write(BufferedWriter writer) throws IOException
      Throws:
      IOException
    • read

      public boolean read(BufferedReader reader) throws IOException
      Throws:
      IOException
    • setPriority

      public void setPriority(double priority)
    • getPriority

      public double getPriority()
    • compareTo

      public int compareTo(Object o)
      Specified by:
      compareTo in interface Comparable
    • clone

      public Object clone()
      Overrides:
      clone in class Object
    • getFieldObject

      public Object getFieldObject(Field fld)
      Description copied from interface: FieldAccessor
      This method allows access to java.lang.reflect.Field objects within the implementing class.
      Specified by:
      getFieldObject in interface FieldAccessor
      Parameters:
      fld - The field to get.
      Returns:
      The data object that is stored in the given field
    • setFieldObject

      public boolean setFieldObject(Field fld, Object fobj)
      Description copied from interface: FieldAccessor
      This allows access to fields withing the implementing object to set there data.
      Specified by:
      setFieldObject in interface FieldAccessor
      Parameters:
      fld - The java field object representing the member field to be set
      fobj - The data to set in that field
      Returns:
      returns true if successful