Class SimpleData

java.lang.Object
org.scictrl.mp.orbitcorrect.model.optics.SimpleData
All Implemented Interfaces:
Cloneable, ISimpleElement
Direct Known Subclasses:
DispersionData, PositionedData

public class SimpleData extends Object implements ISimpleElement
This is class that contains data for some AbstractOpticalElement.
Author:
igor@scictrl.com
  • Field Details

    • x

      protected double x
      X position
    • z

      protected double z
      Z position
    • source

      protected AbstractOpticalElement source
      Data source element.
    • dataHolder

      protected org.scictrl.mp.orbitcorrect.model.optics.DataHolder dataHolder
      Data holder.
  • Constructor Details

    • SimpleData

      public SimpleData(String name)
      SimpleData constructor.
      Parameters:
      name - String
    • SimpleData

      public SimpleData(String name, AbstractOpticalElement source)
      SimpleData constructor.
      Parameters:
      name - String
      source - AbstractOpticalElement
    • SimpleData

      public SimpleData(String name, AbstractOpticalElement source, double x, double z)
      SimpleData constructor.
      Parameters:
      name - String
      source - AbstractOpticalElement
      x - double
      z - double
  • Method Details

    • clone

      public Object 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 interface ISimpleElement
      Overrides:
      clone in class Object
      Returns:
      a Object the clone of this element.
    • getName

      public String 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 interface ISimpleElement
      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
      objects
    • getPosition

      public double getPosition()
      This method returns position of optical element, whose data is this SimpleData.
      Returns:
      double position
    • getSource

      public AbstractOpticalElement getSource()
      This method returns source AbstractOpticalElement (AbstractOpticalElement, whose data is this SimpleData).
      Returns:
      AbstractOpticalElement
    • toString

      public String 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 interface ISimpleElement
      Overrides:
      toString in class Object