public class LWRRod extends LWRComponent
The LWRRod class is a generalized class representing a basic rod as a collection of materialBlocks contained by a ring (aka the clad). A LWRRod should be considered the basis for all "rod-tyoes" implemented within a reactor. Details concerning material compositions should be taken care of on the collections of rings on the materialblocks.
Please note that the MaterialBlocks MUST HAVE UNIQUE POSITIONS SET! If there are material blocks with 2 of the same EXACT position type, then the first materialblock will be overridden by the second materialblock of the same position value. This is very important to understand when adding materialBlocks to the grid.
iComponentVisitor
iComponentListener
Constructor and Description |
---|
LWRRod()
The nullary Constructor.
|
LWRRod(java.lang.String name)
A parameterized Constructor.
|
LWRRod(java.lang.String name,
Material fillGas,
double pressure,
java.util.TreeSet<MaterialBlock> materialBlocks)
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.
|
java.lang.Object |
clone()
Deep copies and returns a newly instantiated object.
|
void |
copy(LWRRod 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.
|
Ring |
getClad()
Returns the clad object of this LWRRod object, if set or null.
|
Material |
getFillGas()
Returns a Material of MaterialType.GAS that fills the voids within this
LWRRod.
|
java.util.TreeSet<MaterialBlock> |
getMaterialBlocks()
Returns the list of MaterialBlocks within this LWRRod.
|
double |
getPressure()
Returns the pressure of the fillGas Material.
|
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.
|
void |
setClad(Ring clad)
Sets the clad object for this LWRRod.
|
void |
setFillGas(Material fillGas)
Sets the Material of MaterialType.GAS that fills the voids within this
LWRRod.
|
void |
setMaterialBlocks(java.util.TreeSet<MaterialBlock> materialBlocks)
Sets the list of MaterialBlocks within this LWRRod.
|
void |
setPressure(double pressure)
Sets the pressure of the fillGas Material.
|
boolean |
writeAttributes(ncsa.hdf.object.h5.H5File h5File,
ncsa.hdf.object.h5.H5Group h5Group)
This operation writes HDF5 Attributes to the metadata of h5Group in the
h5File.
|
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
public LWRRod()
The nullary Constructor.
public LWRRod(java.lang.String name)
A parameterized Constructor.
name
- The name of this LWRRod.
public LWRRod(java.lang.String name, Material fillGas, double pressure, java.util.TreeSet<MaterialBlock> materialBlocks)
A parameterized Constructor.
name
- The name of this LWRRod.
fillGas
- A Material of MaterialType.GAS that fills the voids within this LWRRod.
pressure
- The pressure of the fillGas Material.
materialBlocks
- The MaterialBlock list within this LWRRod.
public Material getFillGas()
Returns a Material of MaterialType.GAS that fills the voids within this LWRRod.
A Material of MaterialType.GAS that fills the voids within this LWRRod.
public void setFillGas(Material fillGas)
Sets the Material of MaterialType.GAS that fills the voids within this LWRRod. Can not be set to null.
fillGas
- A Material of MaterialType.GAS that fills the voids within this LWRRod.
public void setPressure(double pressure)
Sets the pressure of the fillGas Material. Can not be set less than or equal to 0.
pressure
- The pressure of the fillGas Material.
public double getPressure()
Returns the pressure of the fillGas Material.
The pressure of the fillGas Material.
public java.util.TreeSet<MaterialBlock> getMaterialBlocks()
Returns the list of MaterialBlocks within this LWRRod.
The Stack object within this LWRRod.
public void setMaterialBlocks(java.util.TreeSet<MaterialBlock> materialBlocks)
Sets the list of MaterialBlocks within this LWRRod. Can not be set null.
materialBlocks
- The materialBlocks list within this LWRRod.
public Ring getClad()
Returns the clad object of this LWRRod object, if set or null.
public void setClad(Ring clad)
Sets the clad object for this LWRRod. It can not be set to null.
clad
- 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(LWRRod 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 boolean writeAttributes(ncsa.hdf.object.h5.H5File h5File, ncsa.hdf.object.h5.H5Group h5Group)
IHdfWriteable
This operation writes HDF5 Attributes to the metadata of h5Group in the h5File. If the h5Group is null or h5File is null or can not be opened, then false is returned. If the operation fails to write all Attributes, then false is returned. Otherwise, true is returned.
writeAttributes
in interface IHdfWriteable
writeAttributes
in class LWRComponent
h5File
- h5Group
- 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 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 LWRComponent
h5Group
- 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