Class Scalar<T>

java.lang.Object
org.eclipse.scanning.api.points.AbstractPosition
org.eclipse.scanning.api.points.Scalar<T>
Type Parameters:
T - the type of the value of this position
All Implemented Interfaces:
Serializable, IPosition

public class Scalar<T> extends AbstractPosition
A single value position.
See Also:
  • Constructor Details

    • Scalar

      public Scalar(String name, T value)
    • Scalar

      public Scalar(String name, int index, T value)
    • Scalar

      public Scalar(String name, int index, T value, double exposureTime)
  • Method Details

    • size

      public int size()
      Description copied from interface: IPosition
      The number of named scalars in this position
      Returns:
      number of scalars
    • getNames

      public List<String> getNames()
      Description copied from interface: IPosition
      The names of all the scalars set for this position. For instance 'x' and 'y' for a map or 'Temperature' Note to implementers: should never return null
      Returns:
      name of scalars
    • get

      public Object get(String name)
      Description copied from interface: IPosition
      The value of a named position. For instance get("X") to return the value of the X IScannable double.
      Parameters:
      name -
      Returns:
      value for the given axis name
    • getValue

      public T getValue()
    • getType

      public Class<T> getType()
    • getIndex

      public int getIndex(String name)
      Description copied from interface: IPosition
      Get the index of the data for instance in a scan of temperature from 290 to 300 step 1, the indices will be 0-10. If one dimension has more than one motor with it, for instance x and y in a line scan, both getIndex("x") and getIndex("y") return the same value.
      Returns:
      data index for given axis name