public class MaterialBlock extends LWRComponent 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 inner core of an LWRRod.
iComponentVisitor
iComponentListener
Constructor and Description |
---|
MaterialBlock()
The nullary Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
addRing(Ring ring)
Adds a Ring to this MaterialBlock's ring collection.
|
java.lang.Object |
clone()
Deep copies and returns a newly instantiated object.
|
int |
compareTo(MaterialBlock arg0) |
void |
copy(MaterialBlock 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.
|
double |
getPosition()
Gets the position
|
Ring |
getRing(double radius)
Returns the Ring located at the provided radius value or null if one
could not be found.
|
Ring |
getRing(java.lang.String ringName)
Returns the Ring with the provided name or null if one could not be
found.
|
java.util.ArrayList<Ring> |
getRings()
Returns an ArrayList of Rings ordered by ascending radii.
|
java.util.ArrayList<IHdfWriteable> |
getWriteableChildren()
Returns writeable children.
|
int |
hashCode()
Returns the hashCode of the object.
|
boolean |
readAttributes(ncsa.hdf.object.h5.H5Group h5Group)
Reads the hdf5 attributes.
|
boolean |
readChild(IHdfReadable iHdfReadable)
This operation returns an ArrayList of IHdfReadable child objects.
|
boolean |
removeRing(java.lang.String ringName)
Removes the Ring from this MaterialBlock's ring collection that has the
provided name.
|
void |
setPosition(double pos)
Sets the position.
|
boolean |
writeAttributes(ncsa.hdf.object.h5.H5File h5File,
ncsa.hdf.object.h5.H5Group h5Group)
writes the hdf5 attributes.
|
accept, 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 boolean addRing(Ring ring)
Adds a Ring to this MaterialBlock's ring collection. If the ring could not be successfully added, then false is returned. This could be due to a ring existing at within the inner and outer radius of an existing Ring object in the Slice.
ring
- The ring to add to this MaterialBlock's Ring collection.
True, if the Ring was successfully added.
public Ring getRing(double radius)
Returns the Ring located at the provided radius value or null if one could not be found.
radius
- A radius value.
The Ring located at the provided radius value or null if one could not be found.
public Ring getRing(java.lang.String ringName)
Returns the Ring with the provided name or null if one could not be found.
ringName
- A Ring name.
The Ring with the provided name or null if one could not be found.
public java.util.ArrayList<Ring> getRings()
Returns an ArrayList of Rings ordered by ascending radii.
An ArrayList of Rings ordered by ascending radii.
public boolean removeRing(java.lang.String ringName)
Removes the Ring from this MaterialBlock's ring collection that has the provided name. Returns true, if the Ring was successfully removed.
ringName
- The name of the Ring to remove.
True, if the Ring was successfully removed from this MaterialBlock's Ring collection.
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(MaterialBlock 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()
Returns writeable children.
getWriteableChildren
in interface IHdfWriteable
getWriteableChildren
in class LWRComponent
the children
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 writeAttributes(ncsa.hdf.object.h5.H5File h5File, ncsa.hdf.object.h5.H5Group h5Group)
writes the hdf5 attributes.
writeAttributes
in interface IHdfWriteable
writeAttributes
in class LWRComponent
h5File
- h5Group
- public boolean readAttributes(ncsa.hdf.object.h5.H5Group h5Group)
Reads the hdf5 attributes.
readAttributes
in interface IHdfReadable
readAttributes
in class LWRComponent
h5Group
- public void setPosition(double pos)
Sets the position.
pos
- the position to set
public double getPosition()
Gets the position
The position set.
public int compareTo(MaterialBlock arg0)
compareTo
in interface java.lang.Comparable<MaterialBlock>