Package hec.rss.model

Class WaterAccountSet

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

public class WaterAccountSet extends Object implements AsciiSerializable
The Class WaterAccountSet.
See Also:
  • Constructor Details

    • WaterAccountSet

      public WaterAccountSet()
      Instantiates a new water account set.
    • WaterAccountSet

      public WaterAccountSet(String name, String desc, List<StorageZoneRef> zones, int index)
      Instantiates a new water account set.
      Parameters:
      name - the name
      desc - the desc
      zones - the zones
      index - the index
  • Method Details

    • containsReservoirOpSet

      public boolean containsReservoirOpSet(int resID, int opSetID)
      Contains reservoir op set.
      Parameters:
      resID - the res id
      opSetID - the op set id
      Returns:
      true, if successful
    • containsReservoir

      public boolean containsReservoir(ReservoirElement res)
    • getIndex

      public int getIndex()
      Gets the index.
      Returns:
      the index
    • getSize

      public int getSize()
      Number of WaterAccounts this set holds.
      Returns:
      int how many WaterAccounts this set holds
    • getSize

      public int getSize(ReservoirElement res)
      Number of WaterAccounts this set holds using a given reservoir.
      Returns:
      int how many WaterAccounts this set holds
    • setName

      public void setName(String name)
      Sets the name.
      Parameters:
      name - the new name
    • getName

      public String getName()
      Gets the name.
      Returns:
      the name
    • setDescription

      public void setDescription(String description)
      Sets the description.
      Parameters:
      description - the new description
    • getDescription

      public String getDescription()
      Gets the description.
      Returns:
      the description
    • setResZoneRefs

      public void setResZoneRefs(List<StorageZoneRef> resPoolRefs)
      Sets the res pool refs.
      Parameters:
      resPoolRefs - the new res pool refs
    • getResZoneRefs

      public List<StorageZoneRef> getResZoneRefs()
      Gets the res pool refs.
      Returns:
      the res pool refs
    • getAllAcctsUsePctOfCon

      public boolean getAllAcctsUsePctOfCon()
    • setAllAcctsUsePctOfCon

      public void setAllAcctsUsePctOfCon(boolean val)
    • containsReservoirOpSet

      public boolean containsReservoirOpSet(StorageZoneRef zoneRef)
      Contains reservoir op set.
      Parameters:
      zoneRef - the zone ref
      Returns:
      true, if successful
    • setWaterAccounts

      public void setWaterAccounts(List<WaterAccount> waterAccounts)
      Sets the water accounts.
      Parameters:
      waterAccounts - the new water accounts
    • getWaterAccounts

      public List<WaterAccount> getWaterAccounts()
      Gets the water accounts.
      Returns:
      the water accounts
    • addWaterAccount

      public void addWaterAccount(WaterAccount wa)
      Adds the water account.
      Parameters:
      wa - the wa
    • getWaterAccounts

      public List<WaterAccount> getWaterAccounts(ReservoirElement res)
      Gets the water accounts using a particular reservoir.
      Parameters:
      res -
      Returns:
      the water accounts
    • createNewWaterAccount

      public WaterAccount createNewWaterAccount(String name, String description, int setIndex)
      Creates the new water account.
      Parameters:
      name - the name
      description - the description
      setIndex - the set index
      Returns:
      the water account
    • renameWaterAccount

      public void renameWaterAccount(String oldName, String newName)
      Rename water account.
      Parameters:
      oldName - the old name
      newName - the new name
    • deleteWaterAccount

      public void deleteWaterAccount(WaterAccount waterAccount)
      Delete water account.
      Parameters:
      waterAccount - the water account
    • getWaterAccount

      public WaterAccount getWaterAccount(String name)
      Gets the water account.
      Parameters:
      name - the name
      Returns:
      the water account
    • getWaterAccountSet

      public WaterAccount getWaterAccountSet(int index)
      Gets the water account.
      Parameters:
      index - the index
      Returns:
      the water account
    • nextWaterAccountIndex

      public int nextWaterAccountIndex()
      Next water account index.
      Returns:
      the int
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • 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
    • initialize

      public void initialize(RssSystem system, RunTimeWindow rtw)
      Initialize water accounts in set.