public class Ring extends LWRComponent implements java.lang.Comparable<Ring>
The ring class represents a single instance of a material at a particular radial coordinate within a cylindrical location on the rod. The height variable on this class should uniformly represent the height from the bottom of the MaterialBlock (or Z coordinate displacement) to help compensate for varying types of materials across a cylindrical segment of a rod.
iComponentVisitor
iComponentListener
Constructor and Description |
---|
Ring()
The nullary Constructor.
|
Ring(java.lang.String name)
A parameterized Constructor.
|
Ring(java.lang.String name,
Material material,
double height,
double outerRadius)
A parameterized Constructor.
|
Ring(java.lang.String name,
Material material,
double height,
double innerRadius,
double outerRadius)
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.
|
int |
compareTo(Ring ring)
(non-Javadoc)
|
void |
copy(Ring 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 |
getHeight()
Returns the height of this Ring.
|
double |
getInnerRadius()
Returns the inner radius of this Ring.
|
Material |
getMaterial()
Returns the Material for this ring.
|
double |
getOuterRadius()
Returns the outer radius for this Ring.
|
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 |
setHeight(double height)
Sets the height of this Ring, which must be greater than zero.
|
void |
setInnerRadius(double innerRadius)
Sets the inner radius of this Ring, which must be greater than or equal
to zero and less than the outer radius.
|
void |
setMaterial(Material material)
Sets the material.
|
void |
setOuterRadius(double outerRadius)
Sets the outer radius of this Ring, which must be greater than the
innerRadius value.
|
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 Ring()
The nullary Constructor.
public Ring(java.lang.String name)
A parameterized Constructor.
name
- The name of this Ring.
public Ring(java.lang.String name, Material material, double height, double outerRadius)
A parameterized Constructor.
name
- The name of this Ring.
material
- The Material for this Ring.
height
- The height of this Ring, which must be greater than zero.
outerRadius
- The outer radius of this Ring, which must be greater than the innerRadius value.
public Ring(java.lang.String name, Material material, double height, double innerRadius, double outerRadius)
A parameterized Constructor.
name
- The name of this Ring.
material
- The Material for this Ring.
height
- The height of this Ring, which must be greater than zero.
innerRadius
- The inner radius of this Ring, which must be greater than or equal to zero.
outerRadius
- The outer radius of this Ring, which must be greater than the innerRadius value.
public double getHeight()
Returns the height of this Ring.
The height of this Ring.
public void setHeight(double height)
Sets the height of this Ring, which must be greater than zero.
height
- The height of this Ring, which must be greater than zero.
public double getInnerRadius()
Returns the inner radius of this Ring.
The inner radius of this Ring.
public void setInnerRadius(double innerRadius)
Sets the inner radius of this Ring, which must be greater than or equal to zero and less than the outer radius.
innerRadius
- The inner radius of this Ring, which must be greater than or equal to zero.
public double getOuterRadius()
Returns the outer radius for this Ring. Must be greater than 0 and the inner radius.
The outer radius for this Ring
public void setOuterRadius(double outerRadius)
Sets the outer radius of this Ring, which must be greater than the innerRadius value.
outerRadius
- The outer radius of this Ring, which must be greater than the innerRadius value.
public Material getMaterial()
Returns the Material for this ring.
The Material for this Ring.
public void setMaterial(Material material)
Sets the material. Can not set to null.
material
- The Material for this Ring.
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(Ring 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 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 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 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