public class PinAssembly extends SFRAssembly
Class representing any assemblies in a SFR that contain pins. This includes both fuel pins (core and blanket), in addition to control assemblies (primary or secondary/shutdown), test assemblies, and shield assemblies. The distinction between the pin assembly type is made using the pinType attribute.
iComponentVisitor
iComponentListener
Constructor and Description |
---|
PinAssembly(int size)
Parameterized constructor with the assembly size (number of pins)
specified.
|
PinAssembly(java.lang.String name,
PinType pinType,
int size)
Parameterized constructor with the assembly size (number of pins), pin
type, and name 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.
|
void |
addComponent(Component child)
An operation that overrides the SFRComposite's operation.
|
boolean |
addPin(SFRPin pin)
Adds the specified SFRPin to the assembly; returns true if the operation
was successful.
|
java.lang.Object |
clone()
Deep copies and returns a newly instantiated object.
|
void |
copy(PinAssembly otherObject)
Deep copies the contents of the object from another 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.
|
SFRComponent |
getDataProviderByLocation(int row,
int column)
Returns an IDataProvider for the location in the assembly.
|
double |
getInnerDuctFlatToFlat()
Returns the inner duct's (outer) flat-to-flat distance.
|
double |
getInnerDuctThickness()
Returns the inner duct's thickness.
|
int |
getNumberOfPins()
Returns the number of pins in the assembly.
|
SFRPin |
getPinByLocation(int row,
int column)
Returns the SFRPin at the specified location (x, y coordinates) in the
assembly.
|
SFRPin |
getPinByName(java.lang.String name)
Returns the SFRPin by the specified name.
|
java.util.ArrayList<java.lang.Integer> |
getPinLocations(java.lang.String name)
Returns an ArrayList of locations within the assembly that are occupied
by the pin matching the specified name.
|
java.util.ArrayList<java.lang.String> |
getPinNames()
Returns an ArrayList of SFRPin names in the assembly.
|
double |
getPinPitch()
Returns the pin pitch (shortest distance between a pin center to an
adjacent pin center) as a double.
|
PinType |
getPinType()
Returns the pin type (primary control, secondary control, core fuel or
blanket fuel).
|
int |
hashCode()
Returns the hashCode of the object.
|
void |
removeComponent(int childId)
An operation that overrides the SFRComposite's operation.
|
void |
removeComponent(java.lang.String name)
An operation that overrides the SFRComposite's operation.
|
boolean |
removePin(java.lang.String name)
Removes the specified SFRPin from the assembly; returns true if the
operation was successful.
|
boolean |
removePinFromLocation(int row,
int column)
Removes the SFRPin from the specified location (x, y coordinates);
returns true if operation was successful.
|
void |
setInnerDuctFlatToFlat(double flatToFlat)
Sets the inner duct's (outer) flat-to-flat distance.
|
void |
setInnerDuctThickness(double innerDuctThickness)
Sets the inner duct's thickness.
|
boolean |
setPinLocation(java.lang.String name,
int row,
int column)
Adds the pin with the specified name to the assembly in the specified
location.
|
void |
setPinPitch(double pinPitch)
Sets the pin pitch (shortest distance between a pin center to an adjacent
pin center).
|
copy, getAssemblyType, getDuctThickness, getSize, setDuctThickness
copy, getComponent, getComponent, getComponentNames, getComponents, getNumberOfComponents
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
register, unregister, update
getDescription, getId, getName, setDescription, setId, setName
public PinAssembly(int size)
Parameterized constructor with the assembly size (number of pins) specified.
size
- The size (number of pins) of the assembly.public PinAssembly(java.lang.String name, PinType pinType, int size)
Parameterized constructor with the assembly size (number of pins), pin type, and name specified.
name
- The name of the assembly.pinType
- The type of the pin.size
- The size (number of pins) of the assembly.public void setPinPitch(double pinPitch)
Sets the pin pitch (shortest distance between a pin center to an adjacent pin center).
pinPitch
- The pin pitch.public double getPinPitch()
Returns the pin pitch (shortest distance between a pin center to an adjacent pin center) as a double.
public void setInnerDuctFlatToFlat(double flatToFlat)
Sets the inner duct's (outer) flat-to-flat distance.
flatToFlat
- The inner duct's (outer) flat-to-flat distance.public double getInnerDuctFlatToFlat()
Returns the inner duct's (outer) flat-to-flat distance.
public void setInnerDuctThickness(double innerDuctThickness)
Sets the inner duct's thickness.
innerDuctThickness
- The inner duct's thickness.public double getInnerDuctThickness()
Returns the inner duct's thickness.
public PinType getPinType()
Returns the pin type (primary control, secondary control, core fuel or blanket fuel).
public boolean addPin(SFRPin pin)
Adds the specified SFRPin to the assembly; returns true if the operation was successful.
pin
- The pin to be added to the PinAssembly.public boolean setPinLocation(java.lang.String name, int row, int column)
Adds the pin with the specified name to the assembly in the specified location. If the pin exists and the location is valid and is not occupied by the same pin, this returns true.
name
- The name of the pin to set. The name must correspond to an
existing pin.row
- The row in which to put the pin.column
- The column in which to put the pin.public boolean removePin(java.lang.String name)
Removes the specified SFRPin from the assembly; returns true if the operation was successful.
name
- The name of the pin to be removed.public boolean removePinFromLocation(int row, int column)
Removes the SFRPin from the specified location (x, y coordinates); returns true if operation was successful.
row
- The row in which the pin can be found.column
- The column in which the pin can be found.public java.util.ArrayList<java.lang.String> getPinNames()
Returns an ArrayList of SFRPin names in the assembly.
public SFRPin getPinByName(java.lang.String name)
Returns the SFRPin by the specified name.
name
- The name of the pin being searched for.public SFRPin getPinByLocation(int row, int column)
Returns the SFRPin at the specified location (x, y coordinates) in the assembly.
row
- The row in which the pin is located.column
- The column in which the pin is located.public java.util.ArrayList<java.lang.Integer> getPinLocations(java.lang.String name)
Returns an ArrayList of locations within the assembly that are occupied by the pin matching the specified name.
name
- The name of the pin being searched for.public int getNumberOfPins()
Returns the number of pins in the assembly.
public SFRComponent getDataProviderByLocation(int row, int column)
Returns an IDataProvider for the location in the assembly. This is distinct from the SFRPin, which, as an SFRComponent, is itself an IDataProvider.
row
- The row in which the IDataProvider is located.column
- The column in which the IDataProvider is located.public void addComponent(Component child)
An operation that overrides the SFRComposite's operation. This operation does nothing and requires that the appropriate, more defined, associated operation to be utilized on this class.
addComponent
in interface Composite
addComponent
in class SFRComposite
child
- The Component that should be added to the Composite.Composite.addComponent(Component child)
public void removeComponent(int childId)
An operation that overrides the SFRComposite's operation. This operation does nothing and requires that the appropriate, more defined, associated operation to be utilized on this class.
removeComponent
in interface Composite
removeComponent
in class SFRComposite
childId
- The ID of the child Component to remove.Composite.removeComponent(int childId)
public void removeComponent(java.lang.String name)
An operation that overrides the SFRComposite's operation. This operation does nothing and requires that the appropriate, more defined, associated operation to be utilized on this class.
removeComponent
in class SFRComposite
name
- The name of the child Component to remove.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 SFRAssembly
otherObject
- The object to be compared.Identifiable.equals(Object otherObject)
public int hashCode()
Returns the hashCode of the object.
hashCode
in interface Identifiable
hashCode
in class SFRAssembly
Identifiable.hashCode()
public void copy(PinAssembly otherObject)
Deep copies the contents of the object from another object.
otherObject
- The object to be copied from.public java.lang.Object clone()
Deep copies and returns a newly instantiated object.
clone
in interface Identifiable
clone
in class SFRAssembly
The newly instantiated copied object.
public void accept(ISFRComponentVisitor visitor)
accept
in class SFRAssembly
visitor
- An ISFRComponentVisitor that is visiting this SFRComponent.