Enum Class IonType

java.lang.Object
java.lang.Enum<IonType>
com.amazon.ion.IonType
All Implemented Interfaces:
Serializable, Comparable<IonType>, Constable

public enum IonType extends 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.

  • Enum Constant Details

    • 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 Details

    • values

      public static IonType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static IonType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
      IllegalArgumentException - if this enum class has no constant with the specified name
      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.