Class DataTypes


  • public final class DataTypes
    extends Object
    This class contains all singleton DataTypes and factory methods.
    Since:
    0.9.0
    • Field Detail

      • ByteType

        public static final ByteType ByteType
        Retrieves the ByteType object.
        Since:
        0.9.0
      • ShortType

        public static final ShortType ShortType
        Retrieves the ShortType object.
        Since:
        0.9.0
      • IntegerType

        public static final IntegerType IntegerType
        Retrieves the IntegerType object.
        Since:
        0.9.0
      • LongType

        public static final LongType LongType
        Retrieves the LongType object.
        Since:
        0.9.0
      • FloatType

        public static final FloatType FloatType
        Retrieves the FloatType object.
        Since:
        0.9.0
      • DoubleType

        public static final DoubleType DoubleType
        Retrieves the DoubleType object.
        Since:
        0.9.0
      • BinaryType

        public static final BinaryType BinaryType
        Retrieves the BinaryType object.
        Since:
        0.9.0
      • BooleanType

        public static final BooleanType BooleanType
        Retrieves the BooleanType object.
        Since:
        0.9.0
      • DateType

        public static final DateType DateType
        Retrieves the DateType object.
        Since:
        0.9.0
      • GeographyType

        public static final GeographyType GeographyType
        Retrieves the GeographyType object.
        Since:
        0.9.0
      • StringType

        public static final StringType StringType
        Retrieves the StringType object.
        Since:
        0.9.0
      • TimestampType

        public static final TimestampType TimestampType
        Retrieves the TimestampType object.
        Since:
        0.9.0
      • TimeType

        public static final TimeType TimeType
        Retrieves the TimeType object.
        Since:
        0.9.0
      • VariantType

        public static final VariantType VariantType
        Retrieves the VariantType object.
        Since:
        0.9.0
    • Method Detail

      • createDecimalType

        public static DecimalType createDecimalType​(int precision,
                                                    int scale)
        Creates a new DecimalType object.
        Parameters:
        precision - An int number representing the precision
        scale - An int number representing the scale
        Returns:
        A new DecimalType object
        Since:
        0.9.0
      • createArrayType

        public static ArrayType createArrayType​(DataType elementType)
        Creates a new ArrayType object.
        Parameters:
        elementType - The data type of array's element
        Returns:
        A new ArrayType object
      • createMapType

        public static MapType createMapType​(DataType keyType,
                                            DataType valueType)
        Create a new MapType object.
        Parameters:
        keyType - The data type of Map's key
        valueType - The data type of Map's value
        Returns:
        A new MapType object