Class NumberToDoubleDecorator

java.lang.Object
com.singularsys.extensions.field.implementations.FieldDecorator
com.singularsys.extensions.field.implementations.NumberToDoubleDecorator
All Implemented Interfaces:
FieldI, IntegerConvertor, Serializable

public class NumberToDoubleDecorator extends FieldDecorator
Decorator which converts all Number types to Double.
See Also:
  • Constructor Details

    • NumberToDoubleDecorator

      public NumberToDoubleDecorator(FieldI field)
    • NumberToDoubleDecorator

      public NumberToDoubleDecorator(FieldI field, boolean simplifyResults)
  • Method Details

    • convertInput

      public Object convertInput(Object in)
      Convert Number types to double. All other types unchanged.
      Specified by:
      convertInput in class FieldDecorator
      Parameters:
      in -
      Returns:
      If appropriate convert in to a different type, otherwise return in.
    • convertOutput

      public Object convertOutput(Object out)
      Description copied from class: FieldDecorator
      Attempt to convert the output from a Field method.
      Specified by:
      convertOutput in class FieldDecorator
      Parameters:
      out -
      Returns:
      out