Class SimpleData
java.lang.Object
org.scictrl.mp.orbitcorrect.model.optics.SimpleData
- All Implemented Interfaces:
Cloneable
,ISimpleElement
- Direct Known Subclasses:
DispersionData
,PositionedData
This is class that contains data for some
AbstractOpticalElement
.- Author:
- igor@scictrl.com
-
Field Summary
Modifier and TypeFieldDescriptionprotected org.scictrl.mp.orbitcorrect.model.optics.DataHolder
Data holder.protected AbstractOpticalElement
Data source element.protected double
X positionprotected double
Z position -
Constructor Summary
ConstructorDescriptionSimpleData
(String name) SimpleData
constructor.SimpleData
(String name, AbstractOpticalElement source) SimpleData
constructor.SimpleData
(String name, AbstractOpticalElement source, double x, double z) SimpleData
constructor. -
Method Summary
Modifier and TypeMethodDescriptionclone()
Returns the clone of this element.getName()
Returns the unique name of this element.double[]
getPair()
This method returns field values x and z as array.double
This method returns position of optical element, whose data is thisSimpleData
.This method returns sourceAbstractOpticalElement
(AbstractOpticalElement, whose data is this SimpleData).toString()
Returns the string representation of this element.
-
Field Details
-
x
protected double xX position -
z
protected double zZ position -
source
Data source element. -
dataHolder
protected org.scictrl.mp.orbitcorrect.model.optics.DataHolder dataHolderData holder.
-
-
Constructor Details
-
SimpleData
SimpleData
constructor.- Parameters:
name
- String
-
SimpleData
SimpleData
constructor.- Parameters:
name
- Stringsource
- AbstractOpticalElement
-
SimpleData
SimpleData
constructor.- Parameters:
name
- Stringsource
- AbstractOpticalElementx
- doublez
- double
-
-
Method Details
-
clone
Returns the clone of this element. This method creates and returns copy of this object. Source of returned copy is source of this class.- Specified by:
clone
in interfaceISimpleElement
- Overrides:
clone
in classObject
- Returns:
- a
Object
the clone of this element.
-
getName
Returns the unique name of this element. Each element used in DataBush must have unique name. Two element instances with same name are threated as same instance. This method returns name, specified by constructor.- Specified by:
getName
in interfaceISimpleElement
- Returns:
- a
String
the unique name of this element.
-
getPair
public double[] getPair()This method returns field values x and z as array.- Returns:
- an array of
invalid reference
double
-
getPosition
public double getPosition()This method returns position of optical element, whose data is thisSimpleData
.- Returns:
- double position
-
getSource
This method returns sourceAbstractOpticalElement
(AbstractOpticalElement, whose data is this SimpleData).- Returns:
- AbstractOpticalElement
-
toString
Returns the string representation of this element. This method returns string that describe this object. Actually it returns fields x, z and tab space between as a string.- Specified by:
toString
in interfaceISimpleElement
- Overrides:
toString
in classObject
-