Package hec.rss.model

Class SystemOpController

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

public class SystemOpController extends NamedType implements AsciiSerializable, Serializable, Cloneable
See Also:
  • Constructor Details

    • SystemOpController

      public SystemOpController()
      Default Constructor for Ascii Serializer
    • SystemOpController

      public SystemOpController(int id, String name, String description)
  • Method Details

    • setParent

      public void setParent(ReservoirSysOp p)
    • getRuleList

      public Vector getRuleList()
      Returns a list of all of the rules in this controller. This list is guaranteed to be non-null
    • getUnitSystem

      public int getUnitSystem()
    • getRuleIDs

      public int[] getRuleIDs()
      Returns an array of integers which index every rule in this controller This array is guaranteed to be non-null
    • newRule

      public SystemOpRule newRule(String type, String name)
      Creates a new rule and returns a reference to the rule.
      Parameters:
      name - - the name of the rule
      desc - - the description of the rule
      Returns:
      returns the new SystemOpRule
    • getRule

      public SystemOpRule getRule(int id)
      return the SystemOpRule matching index, or null if it does not exist
    • getRule

      public SystemOpRule getRule(String name)
      return the SystemOpRule matching name, or null if it does not exist
    • deleteRule

      public void deleteRule(SystemOpRule rule)
      Deletes the Rule from the controller
    • getNextIndex

      protected int getNextIndex()
      This is an index generator. It returns the next value in the index.
    • clone

      public Object clone() throws CloneNotSupportedException
      Description copied from class: NamedType
      Creates a new object of the same class as this object.
      It then initializes each of the new object's fields by assigning it the same value as the corresponding field in this object. No
      constructor is called.
      Overrides:
      clone in class NamedType
      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
      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