Package xal.smf

Class TransformFactory

java.lang.Object
xal.smf.TransformFactory

public class TransformFactory extends Object
TransformFactory generates a ValueTransform from a DataAdaptor.
Author:
tap
  • Constructor Details

    • TransformFactory

      protected TransformFactory()
      Creates a new instance of TransformFactory
  • Method Details

    • getTransform

      public static ValueTransform getTransform(DataAdaptor adaptor) throws NoSuchTransformException
      Generate a transform from the given adaptor. The adaptor defines the properties of the desired transform including the type and any supporting parameters. The static method called to generate the transform is determined by the type and constructed by appending "Transform" to get the method name. All generator methods must be declared static and take an adaptor as its only argument.
      Parameters:
      adaptor - The adaptor defining the transform.
      Returns:
      A value transform with the properties specified by the adaptor.
      Throws:
      NoSuchTransformException - if the transform of the specified type cannot be generated.
    • doubleScaleTransform

      public static ValueTransform doubleScaleTransform(DataAdaptor adaptor)
      Generate a value transform which simply scales a double value.
      Parameters:
      adaptor - The adaptor defining the transform.
      Returns:
      A value transform with the properties specified by the adaptor.
    • doubleTranslationTransform

      public static ValueTransform doubleTranslationTransform(DataAdaptor adaptor)
      Generate a value transform which applies a simple offset transform to a double value scalar.
      Parameters:
      adaptor - The adaptor defining the transform.
      Returns:
      A value transform with the properties specified by the adaptor.
    • doubleLinearTransform

      public static ValueTransform doubleLinearTransform(DataAdaptor adaptor)
      Generate a value transform which applies a simple linear transform (scale and offset) to a double value scalar.
      Parameters:
      adaptor - The adaptor defining the transform.
      Returns:
      A value transform with the properties specified by the adaptor.
    • doubleArrayScaleTransform

      public static ValueTransform doubleArrayScaleTransform(DataAdaptor adaptor)
      Generate a value transform which simply scales a double array of values.
      Parameters:
      adaptor - The adaptor defining the transform.
      Returns:
      A value transform with the properties specified by the adaptor.
    • doubleArrayTranslationTransform

      public static ValueTransform doubleArrayTranslationTransform(DataAdaptor adaptor)
      Generate a value transform which applies a simple offset transform to a double array of values.
      Parameters:
      adaptor - The adaptor defining the transform.
      Returns:
      A value transform with the properties specified by the adaptor.
    • doubleArrayLinearTransform

      public static ValueTransform doubleArrayLinearTransform(DataAdaptor adaptor)
      Generate a value transform which applies a simple linear transform (scale and offset) to a double array of values.
      Parameters:
      adaptor - The adaptor defining the transform.
      Returns:
      A value transform with the properties specified by the adaptor.