Class NumberToDoubleDecorator
- java.lang.Object
-
- com.singularsys.extensions.field.implementations.FieldDecorator
-
- com.singularsys.extensions.field.implementations.NumberToDoubleDecorator
-
- All Implemented Interfaces:
FieldI,java.io.Serializable
public class NumberToDoubleDecorator extends FieldDecorator
Decorator which converts all Number types to Double.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description NumberToDoubleDecorator(FieldI field)NumberToDoubleDecorator(FieldI field, boolean simplifyResults)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ObjectconvertInput(java.lang.Object in)Convert Number types to double.java.lang.ObjectconvertOutput(java.lang.Object out)Attempt to convert the output from a Field method.
-
-
-
Method Detail
-
convertInput
public java.lang.Object convertInput(java.lang.Object in) throws EvaluationExceptionConvert Number types to double. All other types unchanged.- Specified by:
convertInputin classFieldDecorator- Returns:
- If appropriate convert
into a different type, otherwise returnin. - Throws:
EvaluationException
-
convertOutput
public java.lang.Object convertOutput(java.lang.Object out) throws EvaluationExceptionDescription copied from class:FieldDecoratorAttempt to convert the output from a Field method.- Specified by:
convertOutputin classFieldDecorator- Returns:
- out
- Throws:
EvaluationException
-
-