Package hec.rss.model

Class SystemReservoirStorage

java.lang.Object
java.util.Observable
hec.lang.NamedType
hec.rss.model.SystemReservoirStorage
All Implemented Interfaces:
AsciiSerializable, FieldAccessor, Serializable, Cloneable, Comparable, Observer, rma.lang.Modifiable

public class SystemReservoirStorage extends NamedType implements AsciiSerializable, Serializable, Cloneable
For each Reservoir System, each reservoir is allowed a certain percentange of storage. A SystemReservoirStorage object represents the storage allowed for reservoir in a system
See Also:
  • Constructor Details

    • SystemReservoirStorage

      public SystemReservoirStorage()
      Default Constructor
    • SystemReservoirStorage

      public SystemReservoirStorage(int resID)
    • SystemReservoirStorage

      public SystemReservoirStorage(int index, int resID)
  • Method Details

    • clone

      public Object clone() throws CloneNotSupportedException
      Returns a copy of this object. The System Rule Id's are copied but a reference between the owner class (Parent) and the System Rule are passed to the clone(); In other words the clone points to the same parent and System Rule as this class
      Overrides:
      clone in class NamedType
      Throws:
      CloneNotSupportedException
    • getStorageValues

      public double[] getStorageValues()
      Returns an array of doubles that represent the set of Reservoir Storages. this array is guaranteed to be not null and the size will range from 0-N values.
    • addStorageValue

      public void addStorageValue(double val)
    • removeStorageValue

      public void removeStorageValue(double val)
    • removeAllValues

      public void removeAllValues()
    • getReservoirId

      public int getReservoirId()
    • setParent

      public void setParent(SystemStorageZone parent)
    • 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
      Overrides:
      getFieldObject in class NamedType
      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
      Overrides:
      setFieldObject in class NamedType
      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