Package hec.model

Class SeasonalValue

java.lang.Object
hec.model.SeasonalValue
All Implemented Interfaces:
AsciiSerializable, FieldAccessor, Serializable

public class SeasonalValue extends Object implements AsciiSerializable
Contains a set of date-values pairs representing seasonal variation of a value. Methods include string I/O and interpolation functions.
See Also:
  • Constructor Details

    • SeasonalValue

      public SeasonalValue()
  • Method Details

    • clearData

      public void clearData()
      Clear all data
    • addValue

      public void addValue(String datestr, double val)
      Add a date-value pair using a String to represent the date
    • interpolateValue

      public double interpolateValue(RunTimeStep rts)
      Interpolate for RunTimeStep
      Parameters:
      rts -
      Returns:
    • interpolateValue

      public double interpolateValue(RunTime runtime)
      Interpolate for hec.model.RunTime
      Parameters:
      runtime -
      Returns:
    • interpolateStepValue

      public double interpolateStepValue(RunTimeStep rts)
      Interpolate for RunTimeStep
      Parameters:
      rts -
      Returns:
    • interpolateStepValue

      public double interpolateStepValue(RunTime runtime)
      Interpolate for hec.model.RunTime
      Parameters:
      runtime -
      Returns:
    • toString

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

      public int parseString(String param)
    • size

      public int size()
    • 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