public class MaterialBlock extends SFRComponent implements java.lang.Comparable<MaterialBlock>
The MaterialBlock class is a generalized class containing a set of concentric and/or radial collection of Rings that constitute the circular structure(s) of SFRPins (in the case of a fuel or control assemblies), and SFRRods (in the case of reflector assemblies).
iComponentVisitor
iComponentListener
Constructor and Description |
---|
MaterialBlock()
Nullary constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
accept(ISFRComponentVisitor visitor)
Overrides the default behavior (ignore) from SFRComponent and implements
the accept operation for this SFRComponent's type.
|
boolean |
addRing(Ring ring)
Adds a ring object to the current collection of rings; returns true if
the operation was successful.
|
java.lang.Object |
clone()
Deep copies and returns a newly instantiated object.
|
int |
compareTo(MaterialBlock block)
Compares the vertical position of two MaterialBlocks.
|
void |
copy(MaterialBlock otherObject)
Deep copies the contents of the object.
|
boolean |
equals(java.lang.Object otherObject)
Compares the contents of objects and returns true if that are identical.
|
Ring |
getRing(double radius)
Returns the ring that contains the specified radius in between the
rings's inner and outer radii, otherwise returns null.
|
Ring |
getRing(java.lang.String name)
Returns the ring of the specified name if it exists, otherwise returns
null.
|
java.util.ArrayList<Ring> |
getRings()
Returns an ArrayList of Rings contained in the material block, ordered by
ascending radii.
|
double |
getVertPosition()
Returns the vertical position (z-displacement) of the material block as a
double, where z=0 at the bottom end of the structure.
|
int |
hashCode()
Returns the hashcode of the object.
|
boolean |
removeRing(java.lang.String name)
Removes the specified ring from the collection of rings; returns true if
the operation was successful.
|
void |
setVertPosition(double vertPosition)
Set the vertical position (z-displacement) of the material block, where
z=0 at the bottom end of the structure.
|
accept, addData, copy, getCurrentTime, getDataAtCurrentTime, getDescription, getFeatureList, getFeaturesAtCurrentTime, getId, getName, getNumberOfTimeSteps, getSourceInfo, getTimes, getTimeStep, getTimeUnits, notifyListeners, register, removeDataFromFeature, setDescription, setId, setName, setSourceInfo, setTime, setTimeUnits, toString, unregister, update
public void setVertPosition(double vertPosition)
Set the vertical position (z-displacement) of the material block, where z=0 at the bottom end of the structure.
vertPosition
- The vertical position (z-displacement) of the material block.
Must be non-negative.public double getVertPosition()
Returns the vertical position (z-displacement) of the material block as a double, where z=0 at the bottom end of the structure.
public boolean addRing(Ring ring)
Adds a ring object to the current collection of rings; returns true if the operation was successful.
ring
- The ring to be added to the material block.public boolean removeRing(java.lang.String name)
Removes the specified ring from the collection of rings; returns true if the operation was successful.
name
- The name of the ring to be removed from the material block.public Ring getRing(double radius)
Returns the ring that contains the specified radius in between the rings's inner and outer radii, otherwise returns null.
radius
- The radius which will be searched for in the collection of
rings.public Ring getRing(java.lang.String name)
Returns the ring of the specified name if it exists, otherwise returns null.
name
- The name of the ring being searched for.public java.util.ArrayList<Ring> getRings()
Returns an ArrayList of Rings contained in the material block, ordered by ascending radii.
public int hashCode()
Returns the hashcode of the object.
hashCode
in interface Identifiable
hashCode
in class SFRComponent
Identifiable.hashCode()
public boolean equals(java.lang.Object otherObject)
Compares the contents of objects and returns true if that are identical.
equals
in interface Identifiable
equals
in class SFRComponent
otherObject
- The other object being compared against.Identifiable.equals(Object otherObject)
public void copy(MaterialBlock otherObject)
Deep copies the contents of the object.
otherObject
- The other object to copy the contents of.public java.lang.Object clone()
Deep copies and returns a newly instantiated object.
clone
in interface Identifiable
clone
in class SFRComponent
public int compareTo(MaterialBlock block)
Compares the vertical position of two MaterialBlocks.
compareTo
in interface java.lang.Comparable<MaterialBlock>
public void accept(ISFRComponentVisitor visitor)
accept
in class SFRComponent
visitor
- An ISFRComponentVisitor that is visiting this SFRComponent.