Package hec.rss.model
Class OpSetRef
java.lang.Object
java.util.Observable
hec.lang.NamedType
hec.rss.model.OpSetRef
- All Implemented Interfaces:
AsciiSerializable,FieldAccessor,Serializable,Cloneable,Comparable,Observer,rma.lang.Modifiable
OpSetRef is a container object that holds a reference to a Operations Set for a particular
Reservoir. This class contains a transient reference to a Operations Set that is lost
on serialization but is easily looked up again. It also contains a fixed ID number for the
operations set it references.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected OpSetThe reference to the particular operation setprotected intthe id/index of the operation set referneced by this objectprotected intThe index of the reservoir that ownes this OpSetprotected ResSystemOpSetA reference ot the parent owner of this operation setFields inherited from class hec.lang.NamedType
_description, _ignoreModifiedEvents, _index, _isValid, _modified, _name, defaultDescription, defaultName, DESCRIPTION_CHANGED, NAME_CHANGED, RENAME_EVENT -
Constructor Summary
ConstructorsConstructorDescriptionOpSetRef()OpSetRef(ResSystemOpSet parent, int index, OpSet opSet) Constructor for the OpSetRef. -
Method Summary
Modifier and TypeMethodDescriptionclone()Returns a copy of this object.getFieldObject(Field fld) This method allows access to java.lang.reflect.Field objects within the implementing class.getOpSet()Returns a reference to a Operation SetintReturns the ID of the Reservoir Opration Set that this object references.intReturs the index of the reservoir element that ownes the Operation Set in this objectbooleansetFieldObject(Field fld, Object fobj) This allows access to fields withing the implementing object to set there data.voidsetParent(ResSystemOpSet parent) Sets the parent owner of this objectMethods 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
-
Field Details
-
_opSet
The reference to the particular operation set -
_opSetID
protected int _opSetIDthe id/index of the operation set referneced by this object -
_systemOpSet
A reference ot the parent owner of this operation set -
_reservoirIndex
protected int _reservoirIndexThe index of the reservoir that ownes this OpSet
-
-
Constructor Details
-
OpSetRef
public OpSetRef() -
OpSetRef
Constructor for the OpSetRef. Sets the parent (the class who ownes this class) and the reference to the Operation Set and the ReservoirElement it came from.
-
-
Method Details
-
getOpSetID
public int getOpSetID()Returns the ID of the Reservoir Opration Set that this object references. Returns RMAConst.UNDEF_INT if there is no reference. -
setParent
Sets the parent owner of this object -
getOpSet
Returns a reference to a Operation Set -
getReserovirIndex
public int getReserovirIndex()Returs the index of the reservoir element that ownes the Operation Set in this object -
clone
Returns a copy of this object. The Operations Set Id's are copied but a reference between the owner class (Parent) and the Operation Set are passed to the clone(); In other words the clone points to the same parent and Operation Set as this class- 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
-