public abstract class Element extends java.lang.Object implements VisitorListener, java.lang.Cloneable
Modifier and Type | Class and Description |
---|---|
static class |
Element.SECTION
Indicates the component relationship of this model representation
with respect to its hardware counterpart.
|
Modifier and Type | Field and Description |
---|---|
static java.text.NumberFormat |
fmt |
protected boolean |
handleAsThick |
Modifier | Constructor and Description |
---|---|
protected |
Element(Element.SECTION secHware,
java.lang.String name,
double position,
double len)
Create a new, initialized
Element object. |
protected |
Element(java.lang.String name,
double position,
double len)
Creates a new instance of Element
|
Modifier and Type | Method and Description |
---|---|
abstract void |
accept(Visitor v)
When called with a Visitor reference the implementor can either
reject to be visited (empty method body) or call the Visitor by
passing its own object reference.
|
java.lang.Object |
clone() |
AcceleratorNode |
getAcceleratorNode()
The XAL AcceleratorNode property.
|
double |
getBase()
Return the base for relative positions.
|
double |
getEndPosition()
Return the downstream end position of this element
|
java.lang.String |
getFam() |
Element.SECTION |
getHardwareSection()
Returns the hardware subsection that this element
represents.
|
double |
getLength()
Return the length of this element in distance units.
|
java.lang.String |
getName()
Return the name of this element.
|
double |
getPosition()
Return the center position of this element
|
double |
getStartPosition()
Return the upstream start position of this element.
|
abstract java.lang.String |
getType()
Return the element type.
|
boolean |
isThick()
Is this really a thick element?
|
void |
setAcceleratorNode(AcceleratorNode node)
The XAL AcceleratorNode property.
|
void |
setBase(double base)
Set the base for relative positions.
|
void |
setHardwareSection(Element.SECTION secHware)
Set the hardware section that this element
represents.
|
void |
setLength(double length)
Set the element length.
|
void |
setPosition(double position)
Set the element's center position.
|
protected java.util.List<Element> |
split(Element insert) |
double |
toAbsolutePosition(double position)
Convert to absolute position
|
java.lang.String |
toCoutString()
Returns a printable string of this element.
|
static java.lang.String |
version()
Return a version string wo the cvs keyword (i.e.
|
public static java.text.NumberFormat fmt
protected boolean handleAsThick
protected Element(java.lang.String name, double position, double len)
protected Element(Element.SECTION secHware, java.lang.String name, double position, double len)
Element
object.secHware
- element's hardware subsectionname
- string identifier for the elementposition
- position of the element within the latticelen
- length of the elementpublic java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
public void setAcceleratorNode(AcceleratorNode node)
public AcceleratorNode getAcceleratorNode()
public void setHardwareSection(Element.SECTION secHware)
secHware
- enumeration of possible hardware subsectionspublic Element.SECTION getHardwareSection()
public abstract java.lang.String getType()
public boolean isThick()
public double getStartPosition()
public double getEndPosition()
public double getPosition()
public double toAbsolutePosition(double position)
public double getLength()
public java.lang.String getName()
public double getBase()
public void setBase(double base)
public void setPosition(double position)
public void setLength(double length)
protected java.util.List<Element> split(Element insert) throws LatticeError
LatticeError
public java.lang.String toCoutString()
public java.lang.String getFam()
public static java.lang.String version()
public abstract void accept(Visitor v)
accept
in interface VisitorListener
v
- the Visitor which wants to visit this object.