Enum SchemaField.Type

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<SchemaField.Type>
    Enclosing class:
    SchemaField

    public static enum SchemaField.Type
    extends java.lang.Enum<SchemaField.Type>
    All the valid field types.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      BOOLEAN
      The Boolean type
      DATE
      The Date type.
      DECIMAL
      Decimal Type
      DOUBLE
      The Double type
      FLOAT
      The Float type
      INTEGER
      The Integer type
      LONG
      The Long type
      MONEY
      Money Type
      POINT
      The Point type
      REFERENCE
      Deprecated.
      will be removed in a future release.
      SHAPE
      The Shape type
      STRING
      The String type
      TEXT
      The Text type
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static SchemaField.Type fromExternal​(java.lang.String s)
      Converts an external value to a type value
      boolean isDate()
      true if the type is a date type.
      protected boolean isFacet()
      true if this type supports faceting.
      boolean isNumeric()
      true if the type is a numeric type.
      boolean isTokenized()
      true if this field type can be tokenized.
      java.lang.String toExternal()
      Converts the type to its external form
      static SchemaField.Type valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static SchemaField.Type[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Method Detail

      • values

        public static SchemaField.Type[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (SchemaField.Type c : SchemaField.Type.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static SchemaField.Type valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • isFacet

        protected boolean isFacet()
        true if this type supports faceting.
      • isNumeric

        public boolean isNumeric()
        true if the type is a numeric type.
      • isDate

        public boolean isDate()
        true if the type is a date type.
      • isTokenized

        public boolean isTokenized()
        true if this field type can be tokenized.
      • toExternal

        public java.lang.String toExternal()
        Converts the type to its external form
        Returns:
        the converted value
      • fromExternal

        public static SchemaField.Type fromExternal​(java.lang.String s)
        Converts an external value to a type value
        Parameters:
        s - the external value, if null or empty returns Type.String
        Returns:
        the type