Package xal.smf
Class TransformFactory
java.lang.Object
xal.smf.TransformFactory
TransformFactory generates a
ValueTransform
from a
DataAdaptor
.- Author:
- tap
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Creates a new instance of TransformFactory -
Method Summary
Modifier and TypeMethodDescriptionstatic ValueTransform
doubleArrayLinearTransform
(DataAdaptor adaptor) Generate a value transform which applies a simple linear transform (scale and offset) to a double array of values.static ValueTransform
doubleArrayScaleTransform
(DataAdaptor adaptor) Generate a value transform which simply scales a double array of values.static ValueTransform
Generate a value transform which applies a simple offset transform to a double array of values.static ValueTransform
doubleLinearTransform
(DataAdaptor adaptor) Generate a value transform which applies a simple linear transform (scale and offset) to a double value scalar.static ValueTransform
doubleScaleTransform
(DataAdaptor adaptor) Generate a value transform which simply scales a double value.static ValueTransform
doubleTranslationTransform
(DataAdaptor adaptor) Generate a value transform which applies a simple offset transform to a double value scalar.static ValueTransform
getTransform
(DataAdaptor adaptor) Generate a transform from the given adaptor.
-
Constructor Details
-
TransformFactory
protected TransformFactory()Creates a new instance of TransformFactory
-
-
Method Details
-
getTransform
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
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
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
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
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
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
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.
-