public class FuelAssembly extends PWRAssembly
The FuelAssembly class is a PWRAssembly populated with a collection of Tubes positioned on a fixed grid. When the addTube() operation is used, if a Tube with the same name exists in the collection, then the Tube will not be added and a value of false will be returned. When using the setTubeLocation() operation, if a Tube with the same name exists at the provided location, then the current Tube name at the provided location will be overwritten.
StatePointData for Tubes should be stored by position and accessed by the getTubeDataProviderAtLocation operation.
iComponentVisitor
iComponentListener
Constructor and Description |
---|
FuelAssembly(int size)
A parameterized Constructor.
|
FuelAssembly(java.lang.String name,
int size)
A parameterized Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
accept(ILWRComponentVisitor visitor)
This operation accepts an ILWRComponentVisitor that can be visit the
LWRComponent to ascertain its type and perform various type-specific
operations.
|
boolean |
addTube(Tube tube)
Adds a Tube to the collection of Tubes.
|
java.lang.Object |
clone()
Deep copies and returns a newly instantiated object.
|
void |
copy(FuelAssembly 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.
|
GridLabelProvider |
getGridLabelProvider()
Returns the GridLabelProvider for this FuelAssembly.
|
int |
getNumberOfTubes()
Returns the number of Tubes in the collection of Tubes.
|
RodClusterAssembly |
getRodClusterAssembly()
Returns the RodClusterAssembly associated with this FuelAssembly or null
if one has not been set.
|
Tube |
getTubeByLocation(int row,
int column)
Returns the Tube corresponding to the provided column and row or null if
one is not found at the provided location.
|
Tube |
getTubeByName(java.lang.String name)
Returns the Tube corresponding to the provided name or null if the name
is not found.
|
LWRDataProvider |
getTubeDataProviderAtLocation(int row,
int column)
Returns the data provider for specific group at location or null if it
does not exist.
|
java.util.ArrayList<java.lang.String> |
getTubeNames()
Returns an ArrayList of names for each element of the collection of
Tubes.
|
java.util.ArrayList<IHdfWriteable> |
getWriteableChildren()
This operation returns an ArrayList of IHdfWriteable child objects.
|
int |
hashCode()
Returns the hashCode of the object.
|
boolean |
readAttributes(ncsa.hdf.object.h5.H5Group h5Group)
This operation reads Attributes from h5Group and assigns their values to
class variables.
|
boolean |
readChild(IHdfReadable iHdfReadable)
This operation returns an ArrayList of IHdfReadable child objects.
|
boolean |
removeTube(java.lang.String tubeName)
Removes a Tube from the collection of Tubes.
|
boolean |
removeTubeFromLocation(int row,
int column)
Removes the Tube at the provided location.
|
void |
setGridLabelProvider(GridLabelProvider gridLabelProvider)
Sets the GridLabelProvider for this FuelAssembly.
|
void |
setRodClusterAssembly(RodClusterAssembly rodClusterAssembly)
Sets the RodClusterAssembly associated with this FuelAssembly.
|
boolean |
setTubeLocation(java.lang.String tubeName,
int row,
int column)
Sets the location for the provided name.
|
addComponent, addLWRRod, copy, getLWRRodByLocation, getLWRRodByName, getLWRRodDataProviderAtLocation, getLWRRodNames, getNumberOfLWRRods, getRodPitch, getSize, removeComponent, removeComponent, removeLWRRod, removeLWRRodFromLocation, setLWRRodLocation, setRodPitch, writeAttributes
copy, getComponent, getComponent, getComponentNames, getComponents, getNumberOfComponents
accept, addData, copy, createGroup, getCurrentTime, getDataAtCurrentTime, getDescription, getFeatureList, getFeaturesAtCurrentTime, getHDF5LWRTag, getId, getName, getNumberOfTimeSteps, getSourceInfo, getTimes, getTimeStep, getTimeUnits, readDatasets, register, removeAllDataFromFeature, setDescription, setId, setName, setSourceInfo, setTime, setTimeUnits, toString, unregister, update, writeDatasets
register, unregister, update
getDescription, getId, getName, setDescription, setId, setName
public FuelAssembly(int size)
A parameterized Constructor.
size
- The size of either dimension of the location grid.
public FuelAssembly(java.lang.String name, int size)
A parameterized Constructor.
name
- The name of this FuelAssembly.
size
- The size of either dimension of the location grid.
public RodClusterAssembly getRodClusterAssembly()
Returns the RodClusterAssembly associated with this FuelAssembly or null if one has not been set.
The RodClusterAssembly associated with this FuelAssembly or null if one has not been set.
public void setRodClusterAssembly(RodClusterAssembly rodClusterAssembly)
Sets the RodClusterAssembly associated with this FuelAssembly.
rodClusterAssembly
- The RodClusterAssembly associated with this FuelAssembly.
public boolean addTube(Tube tube)
Adds a Tube to the collection of Tubes. If a Tube with the same name exists in the collection or if the passed tube is null, then the Tube will not be added and a value of false will be returned.
tube
- The Tube to add to the collection of Tubes.
True, if the Tube was added successfully.
public boolean removeTube(java.lang.String tubeName)
Removes a Tube from the collection of Tubes. Returns false if the tubeName does not exist or if the string passed is null.
tubeName
- The name of the Tube to be removed.
True, if the Tube was removed successfully.
public boolean removeTubeFromLocation(int row, int column)
Removes the Tube at the provided location. Returns true if the removal was successful.
row
- The row position.
column
- The column position.
True, if the Tube removal was successful.
public java.util.ArrayList<java.lang.String> getTubeNames()
Returns an ArrayList of names for each element of the collection of Tubes.
An ArrayList of names for each element of the collection of Tubes.
public Tube getTubeByName(java.lang.String name)
Returns the Tube corresponding to the provided name or null if the name is not found.
name
- The provided Tube's name.
The Tube corresponding to the provided name or null if the name is not found.
public Tube getTubeByLocation(int row, int column)
Returns the Tube corresponding to the provided column and row or null if one is not found at the provided location.
row
- The row position.
column
- The column position.
The Tube corresponding to the provided column and row or null if one is not found at the provided location.
public int getNumberOfTubes()
Returns the number of Tubes in the collection of Tubes.
The number of Tubes.
public boolean setTubeLocation(java.lang.String tubeName, int row, int column)
Sets the location for the provided name. Overrides the location of another component name as required. Returns true if this operation was successful, false otherwise. Note it will return true if the same name is overridden.
tubeName
- The Tube's name.
row
- The row position.
column
- The column position.
True, if the location of the LWRRod was set successfully.
public GridLabelProvider getGridLabelProvider()
Returns the GridLabelProvider for this FuelAssembly.
The GridLabelProvider for this FuelAssembly.
public void setGridLabelProvider(GridLabelProvider gridLabelProvider)
Sets the GridLabelProvider for this FuelAssembly. Can not be set to null.
gridLabelProvider
- The GridLabelProvider for this FuelAssembly.
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 PWRAssembly
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 PWRAssembly
The hash of the object.
public void copy(FuelAssembly 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 PWRAssembly
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 PWRAssembly
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 PWRAssembly
iHdfReadable
- public boolean readAttributes(ncsa.hdf.object.h5.H5Group h5Group)
IHdfReadable
This operation reads Attributes from h5Group and assigns their values to class variables. If h5Group is null, false is returned. If any Attribute values are null, false is returned. Otherwise, true is returned.
readAttributes
in interface IHdfReadable
readAttributes
in class PWRAssembly
h5Group
- public LWRDataProvider getTubeDataProviderAtLocation(int row, int column)
Returns the data provider for specific group at location or null if it does not exist.
row
- the row
column
- The column
the provider
public void accept(ILWRComponentVisitor visitor)
This operation accepts an ILWRComponentVisitor that can be visit the LWRComponent to ascertain its type and perform various type-specific operations.
accept
in class LWRComponent
visitor
- The visitor