public class LWRComposite extends LWRComponent implements Composite
The LWRComposite class represents all reactor components that can store and manage LWRComponents. This class implements the ICE Composite interface. This class was designed as a "branch" within the Reactor package to hold references to other LWRComponents. Although this class implements the Composite interface, classes that extend LWRComposite should consider if they will need to override the Composite Interface's operations to provide specific utility as needed.
iComponentVisitor
iComponentListener
Constructor and Description |
---|
LWRComposite()
The Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addComponent(Component child)
(non-Javadoc)
|
java.lang.Object |
clone()
Deep copies and returns a newly instantiated object.
|
void |
copy(LWRComposite otherObject)
Deep copies the contents of the object.
|
boolean |
equals(java.lang.Object otherObject)
Overrides the equals operation to check the attributes on this object
with another object of the same type.
|
Component |
getComponent(int childId)
(non-Javadoc)
|
LWRComponent |
getComponent(java.lang.String name)
Returns the LWRComponent corresponding to the provided name or null if
the name is not found.
|
java.util.ArrayList<java.lang.String> |
getComponentNames()
Returns an ArrayList of Strings containing the names of all LWRComponents
contained in this LWRComposite.
|
java.util.ArrayList<Component> |
getComponents()
(non-Javadoc)
|
int |
getNumberOfComponents()
(non-Javadoc)
|
java.util.ArrayList<IHdfWriteable> |
getWriteableChildren()
This operation returns an ArrayList of IHdfWriteable child objects.
|
int |
hashCode()
Returns the hashCode of the object.
|
boolean |
readChild(IHdfReadable iHdfReadable)
This operation returns an ArrayList of IHdfReadable child objects.
|
void |
removeComponent(int childId)
(non-Javadoc)
|
void |
removeComponent(java.lang.String name)
Removes a LWRComponent with the provided name from this LWRComposite.
|
accept, accept, addData, copy, createGroup, getCurrentTime, getDataAtCurrentTime, getDescription, getFeatureList, getFeaturesAtCurrentTime, getHDF5LWRTag, getId, getName, getNumberOfTimeSteps, getSourceInfo, getTimes, getTimeStep, getTimeUnits, readAttributes, readDatasets, register, removeAllDataFromFeature, setDescription, setId, setName, setSourceInfo, setTime, setTimeUnits, toString, unregister, update, writeAttributes, writeDatasets
register, unregister, update
getDescription, getId, getName, setDescription, setId, setName
public LWRComponent getComponent(java.lang.String name)
Returns the LWRComponent corresponding to the provided name or null if the name is not found.
name
- The provided LWRComponent's name.
The LWRComponent corresponding to the provided name or null if the name is not found.
public java.util.ArrayList<java.lang.String> getComponentNames()
Returns an ArrayList of Strings containing the names of all LWRComponents contained in this LWRComposite.
An ArrayList of Strings containing the names of all LWRComponents contained in this LWRComposite
public void removeComponent(java.lang.String name)
Removes a LWRComponent with the provided name from this LWRComposite.
name
- The name of the LWRComponent to remove.
public boolean equals(java.lang.Object otherObject)
Overrides the equals operation to check the attributes on this object with another object of the same type. Returns true if the objects are equal. False otherwise.
equals
in interface Identifiable
equals
in class LWRComponent
otherObject
- The object to be compared.
True if otherObject is equal. False otherwise.
public int hashCode()
Returns the hashCode of the object.
hashCode
in interface Identifiable
hashCode
in class LWRComponent
The hash of the object.
public void copy(LWRComposite otherObject)
Deep copies the contents of the object.
otherObject
- The object to be copied.
public java.lang.Object clone()
Deep copies and returns a newly instantiated object.
clone
in interface Identifiable
clone
in class LWRComponent
The newly instantiated copied object.
public java.util.ArrayList<IHdfWriteable> getWriteableChildren()
IHdfWriteable
This operation returns an ArrayList of IHdfWriteable child objects. If this IHdfWriteable has no IHdfWriteable child objects, then null is returned.
getWriteableChildren
in interface IHdfWriteable
getWriteableChildren
in class LWRComponent
public boolean readChild(IHdfReadable iHdfReadable)
This operation returns an ArrayList of IHdfReadable child objects. If this IHdfReadable has no IHdfReadable child objects, then null is returned.
readChild
in interface IHdfReadable
readChild
in class LWRComponent
iHdfReadable
- public void addComponent(Component child)
addComponent
in interface Composite
child
- The Component that should be added to the Composite.
Composite.addComponent(Component child)
public void removeComponent(int childId)
removeComponent
in interface Composite
childId
- The id of the child Component that should be removed from the Composite.
Composite.removeComponent(int childId)
public Component getComponent(int childId)
getComponent
in interface Composite
childId
- The id of the child Component that should be retrieved from the Composite.
The child with id childId that was retrieved from the Composite. NULL if the childId was not found in the Composite.
Composite.getComponent(int childId)
public int getNumberOfComponents()
getNumberOfComponents
in interface Composite
The number of child Components contained in the Composite.
Composite.getNumberOfComponents()
public java.util.ArrayList<Component> getComponents()
getComponents
in interface Composite
The set of Components.
Composite.getComponents()