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:
-
Field Summary
Fields inherited from class hec.lang.NamedType
_description, _ignoreModifiedEvents, _index, _isValid, _modified, _name, defaultDescription, defaultName, DESCRIPTION_CHANGED, NAME_CHANGED, RENAME_EVENT -
Constructor Summary
ConstructorsConstructorDescriptionDefault Constructor for Ascii SerializerSystemOpController(int id, String name, String description) -
Method Summary
Modifier and TypeMethodDescriptionclone()Creates a new object of the same class as this object.voiddeleteRule(SystemOpRule rule) Deletes the Rule from the controllergetFieldObject(Field fld) This method allows access to java.lang.reflect.Field objects within the implementing class.protected intThis is an index generator.getRule(int id) return the SystemOpRule matching index, or null if it does not existreturn the SystemOpRule matching name, or null if it does not existint[]Returns an array of integers which index every rule in this controller This array is guaranteed to be non-nullReturns a list of all of the rules in this controller.intCreates a new rule and returns a reference to the rule.booleansetFieldObject(Field fld, Object fobj) This allows access to fields withing the implementing object to set there data.voidMethods inherited from class hec.lang.NamedType
addModifiableListener, compareTo, fireModifiedStateChanged, getDescription, getDisplayName, getIgnoreModifiedEvents, getIndex, getName, isModified, isValid, readResolve, removeModifiableListener, rename, set, setDescription, setIgnoreModifiedEvents, setIndex, setModified, setName, setValid, toString, update, useRecursiveModifiedTestMethods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
-
Constructor Details
-
SystemOpController
public SystemOpController()Default Constructor for Ascii Serializer -
SystemOpController
-
-
Method Details
-
setParent
-
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
Creates a new rule and returns a reference to the rule.- Parameters:
name- - the name of the ruledesc- - the description of the rule- Returns:
- returns the new SystemOpRule
-
getRule
return the SystemOpRule matching index, or null if it does not exist -
getRule
return the SystemOpRule matching name, or null if it does not exist -
deleteRule
Deletes the Rule from the controller -
getNextIndex
protected int getNextIndex()This is an index generator. It returns the next value in the index. -
clone
Description copied from class:NamedTypeCreates 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:
clonein classNamedType- Throws:
CloneNotSupportedException
-
getFieldObject
Description copied from interface:FieldAccessorThis method allows access to java.lang.reflect.Field objects within the implementing class.- Specified by:
getFieldObjectin interfaceFieldAccessor- Overrides:
getFieldObjectin classNamedType- Parameters:
fld- The field to get.- Returns:
- The data object that is stored in the given field
-
setFieldObject
Description copied from interface:FieldAccessorThis allows access to fields withing the implementing object to set there data.- Specified by:
setFieldObjectin interfaceFieldAccessor- Overrides:
setFieldObjectin classNamedType- Parameters:
fld- The java field object representing the member field to be setfobj- The data to set in that field- Returns:
- returns true if successful
-