Class NumericType

    • Constructor Detail

      • NumericType

        public NumericType​(String name,
                           Class clazz,
                           int enumType)
    • Method Detail

      • isOrderable

        public boolean isOrderable()
        A numeric type defines an ordering.
        Overrides:
        isOrderable in class Type
        Returns:
        true if an order is defined for this; false otherwise.
      • getValue

        public abstract Number getValue​(Number value)
        Converts the specified value into a value of this numeric type. E.g. an Integer is converted into a Double, if this represents the numeric type double.
        Specified by:
        getValue in interface NumberType
        Parameters:
        value - value to be converted
        Returns:
        converted value
      • negate

        public abstract Number negate​(Number value)
        Returns -value.
        Specified by:
        negate in interface NumberType
        Parameters:
        value - value to be negated
        Returns:
        -value