Package hec.rss.model

Class TimeOfDayMultiplier

java.lang.Object
hec.rss.model.TimeOfDayMultiplier
All Implemented Interfaces:
AsciiSerializable, FieldAccessor, AltInputReportInfc, Serializable, Cloneable

public class TimeOfDayMultiplier extends Object implements Serializable, Cloneable, AsciiSerializable, AltInputReportInfc
TimeOfDayMultiplier.java This object consists of an array of doubles that act as a multiplier value for interval of the day, or will compute a weighting factor for the hour of the day
See Also:
  • Constructor Details

    • TimeOfDayMultiplier

      public TimeOfDayMultiplier()
  • Method Details

    • isDefaults

      public boolean isDefaults()
      returns true if all multipliers == 1
    • isAllZeroes

      public boolean isAllZeroes()
      returns true if all multipliers == 0
    • getLargestHourlyMultiplier

      public double getLargestHourlyMultiplier()
    • getHourlyMultiplier

      public double getHourlyMultiplier(int hour)
      Returns the multiplier for a given hour of the day
    • getHourlyWeightedMultiplier

      public double getHourlyWeightedMultiplier(int hour)
      Returns the multiplier for a given hour of the day divided by the sum of all multipliers, and assuming interval value should be apportioned over the hour. The idea is for all the weighed multipliers to sum to 1.0
    • sumHourly

      public double sumHourly()
      Sum all the weights
    • getMultipliers

      public double[] getMultipliers()
      Returns the set of multipliers
    • setMultipliers

      public void setMultipliers(double[] multiplier)
      Sets the multipliers
    • setMultiplier

      public boolean setMultiplier(int idx, double val)
      Sets the multiplier for a given day
    • isValidInterval

      public static boolean isValidInterval(int interval)
      Test that the interval time ( in hours ) is valid
    • setInterval

      public void setInterval(int interval)
      Set interval ( in hours ) for multiplier data
    • getInterval

      public int getInterval()
      Interval time in hours
    • clone

      public Object clone() throws CloneNotSupportedException
      Clones this object
      Overrides:
      clone in class Object
      Throws:
      CloneNotSupportedException
    • 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
    • outputReport

      public void outputReport(AlternativeInputReport report, org.jdom.Element elem)
      Description copied from interface: AltInputReportInfc
      Alternative Input Report Interface for data.
      Specified by:
      outputReport in interface AltInputReportInfc