public class Subchannel extends Pipe
Represents a lattice of rods for housing fuel rods of a reactor. For the purpose of drawing, this is just a specialized pipe.
iComponentVisitor
iComponentListener
Constructor and Description |
---|
Subchannel()
Nullary constructor.
|
Subchannel(int numRods,
double rodDiameter,
double pitch)
Parameterized constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
accept(IPlantComponentVisitor visitor)
Accepts PlantComponentVisitors to reveal the type of a PlantComponent.
|
java.lang.Object |
clone()
Performs a deep copy and returns a newly instantiated Object.
|
void |
copy(Subchannel otherObject)
Deep copies the contents of otherObject.
|
boolean |
equals(java.lang.Object otherObject)
Performs an equality check between two Objects.
|
int |
getNumRods() |
double |
getPitch() |
double |
getRodDiameter() |
int |
hashCode()
Returns the hashCode of the object.
|
void |
setNumRods(int numRods) |
void |
setPitch(double pitch) |
void |
setRodDiameter(double rodDiameter) |
copy, getLength, getRadius, setLength, setRadius
copy, getNumElements, getOrientation, getPosition, getRotation, setNumElements, setOrientation, setPosition, setRotation
accept, copy, toString
copy, getDescription, getId, getName, register, setDescription, setId, setName, unregister, update
register, unregister, update
getDescription, getId, getName, setDescription, setId, setName
public Subchannel()
Nullary constructor.
public Subchannel(int numRods, double rodDiameter, double pitch)
Parameterized constructor.
numRods
- Number of rods contained.
rodDiameter
- Diameter of the (uniformly-sized) fuel rods.
pitch
- Pitch of the fuel rods.
public int getNumRods()
public void setNumRods(int numRods)
numRods
- the numRods to setpublic double getRodDiameter()
public void setRodDiameter(double rodDiameter)
rodDiameter
- the rodDiameter to setpublic double getPitch()
public void setPitch(double pitch)
pitch
- the pitch to setpublic boolean equals(java.lang.Object otherObject)
Performs an equality check between two Objects.
equals
in interface Identifiable
equals
in class Pipe
otherObject
- The other Object to compare against.
Returns true if the two objects are equal, otherwise false.
Identifiable.equals(Object otherObject)
public java.lang.Object clone()
Performs a deep copy and returns a newly instantiated Object.
clone
in interface Identifiable
clone
in class Pipe
The newly instantiated Object.
public void copy(Subchannel otherObject)
Deep copies the contents of otherObject.
otherObject
- The other object to copy the contents from.
public int hashCode()
Returns the hashCode of the object.
hashCode
in interface Identifiable
hashCode
in class Pipe
The hashCode of the Object.
Identifiable.hashCode()
public void accept(IPlantComponentVisitor visitor)
Accepts PlantComponentVisitors to reveal the type of a PlantComponent.