Enum IonType

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<IonType>

    public enum IonType
    extends java.lang.Enum<IonType>
    Enumeration identifying the core Ion data types.

    Note that DATAGRAM is a pseudo-type used only by IonDatagram, and it is not a legal value in most places where IonType is used.

    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean isContainer​(IonType t)
      Determines whether a type represents an Ion container.
      static boolean isLob​(IonType t)
      Determines whether a type represents an Ion LOB scalar, namely BLOB or CLOB.
      static boolean isText​(IonType t)
      Determines whether a type represents an Ion text scalar, namely STRING or SYMBOL (but not CLOB).
      static IonType valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static IonType[] 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
    • Enum Constant Detail

      • NULL

        public static final IonType NULL
      • BOOL

        public static final IonType BOOL
      • INT

        public static final IonType INT
      • FLOAT

        public static final IonType FLOAT
      • DECIMAL

        public static final IonType DECIMAL
      • TIMESTAMP

        public static final IonType TIMESTAMP
      • SYMBOL

        public static final IonType SYMBOL
      • STRING

        public static final IonType STRING
      • CLOB

        public static final IonType CLOB
      • BLOB

        public static final IonType BLOB
      • LIST

        public static final IonType LIST
      • SEXP

        public static final IonType SEXP
      • STRUCT

        public static final IonType STRUCT
      • DATAGRAM

        public static final IonType DATAGRAM
    • Method Detail

      • values

        public static IonType[] 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 (IonType c : IonType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static IonType 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
      • isContainer

        public static boolean isContainer​(IonType t)
        Determines whether a type represents an Ion container. This includes DATAGRAM.
        Parameters:
        t - may be null.
        Returns:
        true when t is LIST, SEXP, STRUCT, or DATAGRAM.
      • isText

        public static boolean isText​(IonType t)
        Determines whether a type represents an Ion text scalar, namely STRING or SYMBOL (but not CLOB).
        Parameters:
        t - may be null.
        Returns:
        true when t is STRING or SYMBOL.
      • isLob

        public static boolean isLob​(IonType t)
        Determines whether a type represents an Ion LOB scalar, namely BLOB or CLOB.
        Parameters:
        t - may be null.
        Returns:
        true when t is BLOB or CLOB.