Package xal.smf
Class TransformFactory
java.lang.Object
xal.smf.TransformFactory
TransformFactory generates a
ValueTransform from a
DataAdaptor.- Author:
- tap
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCreates a new instance of TransformFactory -
Method Summary
Modifier and TypeMethodDescriptionstatic ValueTransformdoubleArrayLinearTransform(DataAdaptor adaptor) Generate a value transform which applies a simple linear transform (scale and offset) to a double array of values.static ValueTransformdoubleArrayScaleTransform(DataAdaptor adaptor) Generate a value transform which simply scales a double array of values.static ValueTransformGenerate a value transform which applies a simple offset transform to a double array of values.static ValueTransformdoubleLinearTransform(DataAdaptor adaptor) Generate a value transform which applies a simple linear transform (scale and offset) to a double value scalar.static ValueTransformdoubleScaleTransform(DataAdaptor adaptor) Generate a value transform which simply scales a double value.static ValueTransformdoubleTranslationTransform(DataAdaptor adaptor) Generate a value transform which applies a simple offset transform to a double value scalar.static ValueTransformgetTransform(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.
-