Package hec.model

Class ModelVariable

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

public class ModelVariable extends Object implements Comparable, Cloneable, hec.io.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)
      Specified by:
      getFieldObject in interface hec.io.AsciiSerializable
    • setFieldObject

      public boolean setFieldObject(Field fld, Object fobj)
      Specified by:
      setFieldObject in interface hec.io.AsciiSerializable