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
FieldsModifier and TypeFieldDescriptionprotected org.scictrl.mp.orbitcorrect.model.optics.DataHolderData holder.protected AbstractOpticalElementData source element.protected doubleX positionprotected doubleZ position -
Constructor Summary
ConstructorsConstructorDescriptionSimpleData(String name) SimpleDataconstructor.SimpleData(String name, AbstractOpticalElement source) SimpleDataconstructor.SimpleData(String name, AbstractOpticalElement source, double x, double z) SimpleDataconstructor. -
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.doubleThis 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
SimpleDataconstructor.- Parameters:
name- String
-
SimpleData
SimpleDataconstructor.- Parameters:
name- Stringsource- AbstractOpticalElement
-
SimpleData
SimpleDataconstructor.- 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:
clonein interfaceISimpleElement- Overrides:
clonein classObject- Returns:
- a
Objectthe 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:
getNamein interfaceISimpleElement- Returns:
- a
Stringthe unique name of this element.
-
getPair
public double[] getPair()This method returns field values x and z as array.- Returns:
- an array of
objects
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:
toStringin interfaceISimpleElement- Overrides:
toStringin classObject
-