Class NumberToDoubleDecorator
java.lang.Object
com.singularsys.extensions.field.implementations.FieldDecorator
com.singularsys.extensions.field.implementations.NumberToDoubleDecorator
- All Implemented Interfaces:
FieldI,IntegerConvertor,Serializable
Decorator which converts all Number types to Double.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionNumberToDoubleDecorator(FieldI field) NumberToDoubleDecorator(FieldI field, boolean simplifyResults) -
Method Summary
Modifier and TypeMethodDescriptionconvertInput(Object in) Convert Number types to double.convertOutput(Object out) Attempt to convert the output from a Field method.
-
Constructor Details
-
NumberToDoubleDecorator
-
NumberToDoubleDecorator
-
-
Method Details
-
convertInput
Convert Number types to double. All other types unchanged.- Specified by:
convertInputin classFieldDecorator- Parameters:
in-- Returns:
- If appropriate convert
into a different type, otherwise returnin.
-
convertOutput
Description copied from class:FieldDecoratorAttempt to convert the output from a Field method.- Specified by:
convertOutputin classFieldDecorator- Parameters:
out-- Returns:
- out
-