Class FloatDataType

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable

    public final class FloatDataType
    extends DataType
    See Also:
    Serialized Form
    • Field Detail

      • FIXED_FLOAT

        public static final int FIXED_FLOAT
        Encode the number as a 32-bit float.
        See Also:
        Constant Field Values
      • ENCODING_FIXED_FLOAT

        public static final java.lang.String ENCODING_FIXED_FLOAT
        See Also:
        Constant Field Values
      • FIXED_DOUBLE

        public static final int FIXED_DOUBLE
        Encode the number as a 64-bit double.
        See Also:
        Constant Field Values
      • ENCODING_FIXED_DOUBLE

        public static final java.lang.String ENCODING_FIXED_DOUBLE
        See Also:
        Constant Field Values
      • SCALE_AUTO

        public static final int SCALE_AUTO
        Encode the number as a scaled double, with automatically determined scale.
        See Also:
        Constant Field Values
      • ENCODING_SCALE_AUTO

        public static final java.lang.String ENCODING_SCALE_AUTO
        See Also:
        Constant Field Values
      • ENCODING_DECIMAL64

        public static final java.lang.String ENCODING_DECIMAL64
        See Also:
        Constant Field Values
      • ENCODING

        public static final java.lang.String[] ENCODING
      • SCALE

        public static final int[] SCALE
      • min

        public java.lang.Number min
      • max

        public java.lang.Number max
    • Constructor Detail

      • FloatDataType

        public FloatDataType​(java.lang.String encoding,
                             boolean nullable)
      • FloatDataType

        public FloatDataType​(java.lang.String encoding,
                             boolean nullable,
                             java.lang.Number min,
                             java.lang.Number max)
    • Method Detail

      • extractSize

        public static int extractSize​(java.lang.String encoding)
                               throws java.text.ParseException
        Throws:
        java.text.ParseException
      • getDefaultInstance

        public static FloatDataType getDefaultInstance()
      • getBaseName

        public java.lang.String getBaseName()
        Specified by:
        getBaseName in class DataType
      • parseEncoding

        public void parseEncoding​(java.lang.String encoding)
        Overrides:
        parseEncoding in class DataType
      • getMin

        public java.lang.Number getMin()
      • getMax

        public java.lang.Number getMax()
      • getMinNotNull

        public java.lang.Number getMinNotNull()
      • getMaxNotNull

        public java.lang.Number getMaxNotNull()
      • check

        public boolean check​(java.lang.Number min,
                             java.lang.Number max)
      • isFloat

        public boolean isFloat()
      • isDecimal64

        public boolean isDecimal64()
      • getScale

        public int getScale()
      • getEncodingScaled

        public static java.lang.String getEncodingScaled​(int size)
      • parseEncodingScaled

        public static int parseEncodingScaled​(java.lang.String encoding)
      • assertValidImpl

        protected void assertValidImpl​(java.lang.Object obj)
        Description copied from class: DataType
        Checks a non-null Boxed value against constraints, if any. If the object is of unsupported type, this method should throw DataType.unsupportedType(java.lang.Object).
        Specified by:
        assertValidImpl in class DataType
        Parameters:
        obj - A Boxed representation of a value.
      • staticParseFloat

        public static float staticParseFloat​(java.lang.CharSequence text)
        Convert non-null CharSequence to float
      • staticParseDouble

        public static double staticParseDouble​(java.lang.CharSequence text)
        Convert non-null CharSequence to double
      • staticFormat

        public static java.lang.String staticFormat​(float f)
      • staticFormat

        public static java.lang.String staticFormat​(double d)
      • staticFormat

        public static java.lang.String staticFormat​(long decimal)
      • toBoxedImpl

        protected java.lang.Object toBoxedImpl​(java.lang.CharSequence text)
        Description copied from class: DataType
        Parse non-null text and return an object without checking constraints.
        Specified by:
        toBoxedImpl in class DataType
      • toStringImpl

        protected java.lang.String toStringImpl​(java.lang.Object obj)
        Description copied from class: DataType
        Converts a non-null, constraint-compliant Boxed value to String.
        Specified by:
        toStringImpl in class DataType
        Parameters:
        obj - A non-null, valid value.
        Returns:
        A String representation.
      • getRange

        public java.lang.Number[] getRange()
      • writeTo

        public void writeTo​(java.io.DataOutputStream out)
                     throws java.io.IOException
        Overrides:
        writeTo in class DataType
        Throws:
        java.io.IOException