Package hec.rss.model

Class OpRuleRef

All Implemented Interfaces:
AsciiSerializable, FieldAccessor, AltInputReportInfc, ZoneObject, Serializable, Cloneable, Comparable, Observer, rma.lang.Modifiable

public class OpRuleRef extends NamedType implements Observer, ZoneObject, AltInputReportInfc
Reference to an OpRule defined for an OpController.
See Also:
  • Constructor Details

    • OpRuleRef

      public OpRuleRef()
    • OpRuleRef

      public OpRuleRef(ZoneObjectParent p, OpRule rule)
    • OpRuleRef

      public OpRuleRef(OpSet parent, OpRule rule, int priority)
  • Method Details

    • getReferencedStateVariables

      public void getReferencedStateVariables(List svlist)
      Specified by:
      getReferencedStateVariables in interface ZoneObject
    • setParent

      public void setParent(ZoneObjectParent p)
      Specified by:
      setParent in interface ZoneObject
    • getParent

      public ZoneObjectParent getParent()
    • removeRuleRef

      public void removeRuleRef(int ruleIndex)
      Specified by:
      removeRuleRef in interface ZoneObject
      Parameters:
      ruleIndex -
    • getActiveRuleRefs

      public List getActiveRuleRefs(RunTimeStep rts)
      Description copied from interface: ZoneObject
      Returns a list of rule refs that are active based on a given input. The implimentation object can decide how to handle what is active and what is not.
      Specified by:
      getActiveRuleRefs in interface ZoneObject
      Returns:
      List of OpRuleRef objects
    • getRuleRefs

      public List getRuleRefs()
      Description copied from interface: ZoneObject
      Returns a list of all rule refs.
      Specified by:
      getRuleRefs in interface ZoneObject
      Returns:
      List of OpRuleRef objects
    • finalize

      public void finalize()
      Overrides:
      finalize in class Object
    • getRuleClassName

      public String getRuleClassName()
    • toString

      public String toString()
      Overrides:
      toString in class NamedType
    • getName

      public String getName()
      Description copied from class: NamedType
      get the NameType's name
      Overrides:
      getName in class NamedType
      Returns:
      the name
    • getRuleIndex

      public int getRuleIndex()
    • setRule

      public void setRule(OpRule rule)
    • getRule

      public OpRule getRule()
    • setOpControllerIndex

      public void setOpControllerIndex(int i)
    • getOpControllerIndex

      public int getOpControllerIndex()
    • setPriority

      public void setPriority(float priority)
      sets the priority of this rule in the referenced use
      Specified by:
      setPriority in interface ZoneObject
    • getPriority

      public float getPriority()
      Specified by:
      getPriority in interface ZoneObject
    • getOpSet

      public OpSet getOpSet()
    • setOpSet

      public void setOpSet(OpSet opset)
    • clone

      public Object clone()
      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.
      Specified by:
      clone in interface ZoneObject
      Overrides:
      clone in class NamedType
    • update

      public void update(Observable o, Object arg)
      This is a callback method that gets called when any object that this reference is listening too is changed.
      Specified by:
      update in interface Observer
      Overrides:
      update in class NamedType
    • isDisabled

      public boolean isDisabled()
      Returns:
    • setDisabled

      public void setDisabled(boolean disabled)
    • 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
    • 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