public class Ring extends SFRComponent implements java.lang.Comparable<Ring>
The ring class represents a single instance of a material at a particular radial coordinate within a cylindrical location of a SFRPin or SFRod. The height variable on this class should uniformly represent the height from the bottom of the MaterialBlock (or z-displacement) to help compensate for varying types of materials throughout a vertical segment of a pin or rod.
iComponentVisitor
iComponentListener
Constructor and Description |
---|
Ring()
Nullary constructor.
|
Ring(java.lang.String name)
Parameterized constructor with name specified.
|
Ring(java.lang.String name,
Material material,
double height,
double innerRadius,
double outerRadius)
Parameterized constructor with name, material, ring height and outer
radius specified.
|
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.
|
java.lang.Object |
clone()
Deep copies and returns a newly instantiated object.
|
int |
compareTo(Ring ring)
Compares "this" ring to the input parameter ring
("that" ring).
|
void |
copy(Ring 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.
|
double |
getHeight()
Returns the ring height (z-displacement within the material block) as a
double.
|
double |
getInnerRadius()
Returns the ring inner radius as a double.
|
Material |
getMaterial()
Returns the material of the ring.
|
double |
getOuterRadius()
Returns the ring's outer radius as a double.
|
int |
hashCode()
Returns the hashcode of the object.
|
void |
setHeight(double height)
Sets the ring height (z-displacement within the material block).
|
void |
setInnerRadius(double innerRadius)
Sets the ring inner radius.
|
void |
setMaterial(Material material)
Sets the ring material.
|
void |
setOuterRadius(double outerRadius)
Sets the ring outer radius.
|
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 Ring()
Nullary constructor.
public Ring(java.lang.String name)
Parameterized constructor with name specified.
name
- Name of the ring.public Ring(java.lang.String name, Material material, double height, double innerRadius, double outerRadius)
Parameterized constructor with name, material, ring height and outer radius specified.
name
- Name of the ring.material
- Material the ring is composed of.height
- Height of the ring within the material block.innerRadius
- Inner radius of the ring. Must be non-negative.outerRadius
- Outer radius of the ring. Must be non-negative.public void setHeight(double height)
Sets the ring height (z-displacement within the material block).
height
- The height of the ring. Must be non-negative.public double getHeight()
Returns the ring height (z-displacement within the material block) as a double.
public void setInnerRadius(double innerRadius)
Sets the ring inner radius.
innerRadius
- The inner radius of the ring. Must be non-negative.public double getInnerRadius()
Returns the ring inner radius as a double.
public void setOuterRadius(double outerRadius)
Sets the ring outer radius.
outerRadius
- The outer radius of the ring. Must be non-negative.public double getOuterRadius()
Returns the ring's outer radius as a double.
public void setMaterial(Material material)
Sets the ring material.
material
- The material the ring is composed of. Cannot be null.public Material getMaterial()
Returns the material of the ring.
public int compareTo(Ring ring)
compareTo
in interface java.lang.Comparable<Ring>
ring
- The ring being compared to.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(Ring 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 void accept(ISFRComponentVisitor visitor)
accept
in class SFRComponent
visitor
- An ISFRComponentVisitor that is visiting this SFRComponent.