com.ibm.streams.operator

Enum Type.MetaType

  • java.lang.Object
    • java.lang.Enum<Type.MetaType>
      • com.ibm.streams.operator.Type.MetaType
  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<Type.MetaType>
    Enclosing interface:
    Type


    public static enum Type.MetaType
    extends java.lang.Enum<Type.MetaType>
    Enumeration of SPL types. A MetaType describes the SPL type that a Type represents and the mapping between the SPL type and Java. Each enumerated type's documentation includes a table that describes the mapping between the SPL type and Java using the InfoSphere Streams Java Operator API. This is the key to a type's table:
    Type Information Key
    SPL type Name of the SPL type
    Object type Java class used for instances of the enumerated type by getObject and setObject.
    Primitive type Primary Java primitive the enumerated type can be got as using getter methods of Tuple or set as using setter methods of OutputTuple.
    Type interfaces List of interfaces implemented by any instance of Type whose Type.getMetaType() method returns the enumerated type.

    In a type's table, for any SPL type T, Tc represents its mapping as an element in a Java composite. For all types except LIST and BLIST this is its Java object type, e.g. java.lang.String for SPL ustring leading to a SPL set<ustring> being represented as a java.util.Set<String> in Java.
    For LIST and BLIST types the composite element type is always its java.util.List type instead of its Java object type. E.g. SPL list<int32> has a Java object type of int[] but SPL set<list<int32>> maps to Java java.util.Set<java.util.List<Integer>>.
    The mapping from an SPL type to its composite type can be obtained using Type.getAsCompositeElementType().

    • Enum Constant Summary

      Enum Constants 
      Enum Constant and Description
      BLIST
      SPL list<T>[n] bounded list of at most n elements.
      BLOB
      SPL blob sequence of bytes.
      BMAP
      SPL map<K,V>[n] bounded map.
      BOOLEAN
      SPL boolean.
      BSET
      SPL set<T>[n] bounded set.
      BSTRING
      SPL rstring[n] bounded-length string of at most n raw 8-bit bytes.
      COMPLEX32
      SPL complex32 32-bit binary floating point complex number.
      COMPLEX64
      SPL complex64 64-bit binary floating point complex number.
      DECIMAL128
      SPL decimal128 IEEE 754 decimal 128-bit floating point number.
      DECIMAL32
      SPL decimal32 IEEE 754 decimal 32-bit floating point number.
      DECIMAL64
      SPL decimal64 IEEE 754 decimal 64-bit floating point number.
      ENUM
      SPL enum.
      FLOAT32
      SPL float32 IEEE 754 binary 32-bit floating point number.
      FLOAT64
      SPL float64 IEEE 754 binary 64-bit floating point number.
      INT16
      SPL int16 signed 16-bit integer.
      INT32
      SPL int32 signed 32-bit integer.
      INT64
      SPL int64 signed 64-bit integer.
      INT8
      SPL int8 signed 8-bit integer.
      LIST
      SPL list<T> sequence of elements of SPL type T.
      MAP
      SPL map<K,V> unordered mapping from key SPL type K to value SPL type V.
      RSTRING
      SPL rstring string of raw 8-bit bytes.
      SET
      SPL set<T> unordered collection elements of SPL type T without duplicates.
      TIMESTAMP
      SPL timestamp point in time, with nanosecond precision.
      TUPLE
      SPL tuple<T name, ...> sequence of attributes.
      UINT16
      SPL uint16 unsigned 16-bit integer.
      UINT32
      SPL uint32 unsigned 32-bit integer.
      UINT64
      SPL uint64 unsigned 64-bit integer.
      UINT8
      SPL uint8 unsigned 8-bit integer.
      USTRING
      SPL ustring string of UTF-16 Unicode characters.
      XML
      SPL XML.
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      java.lang.String getLanguageType()
      Returns the type name as it appears in SPL, null if it is a composite type that does not have a single representation in SPL.
      java.math.MathContext getMathContext()
      Return a suitable MathContext.
      java.lang.Class<? extends Type> getMetaTypeInteface()
      Get the interface that provide the meta-data about the type.
      boolean isCollectionType()
      Is the type a SPL collection type.
      boolean isList()
      Is the type a SPL list type.
      boolean isMap()
      Is the type a SPL map type.
      boolean isSet()
      Is the type a SPL set type.
      static Type.MetaType valueOf(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static Type.MetaType[] 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

      • BOOLEAN

        public static final Type.MetaType BOOLEAN
        SPL boolean.
        Type information
        SPL type boolean
        Object type java.lang.Boolean
        Primitive type boolean
        Type interface Type
      • INT8

        public static final Type.MetaType INT8
        SPL int8 signed 8-bit integer.
        Type information
        SPL type int8
        Object type java.lang.Byte
        Primitive type byte
        Type interface Type
      • INT16

        public static final Type.MetaType INT16
        SPL int16 signed 16-bit integer.
        Type information
        SPL type int16
        Object type java.lang.Short
        Primitive type short
        Type interface Type
      • INT32

        public static final Type.MetaType INT32
        SPL int32 signed 32-bit integer.
        Type information
        SPL type int32
        Object type java.lang.Integer
        Primitive type int
        Type interface Type
      • INT64

        public static final Type.MetaType INT64
        SPL int64 signed 64-bit integer.
        Type information
        SPL type int64
        Object type java.lang.Long
        Primitive type long
        Type interface Type
      • UINT8

        public static final Type.MetaType UINT8
        SPL uint8 unsigned 8-bit integer. SPL uint8 is mapped to Java's 8-bit signed type in primitive (byte) and object form (java.lang.Byte) as Java does not support unsigned integral values.
        Any uint8 within an SPL collection type will be represented using java.lang.Byte objects and thus contain signed values.
        Applications can handle such values as unsigned values, by converting them to a short (or larger) integer primitive. See Tuple.getByte(int) for details on how uint8 attributes can be retrieved as unsigned values.
        Type information
        SPL type uint8
        Object type java.lang.Byte
        Primitive type byte
        Type interface Type
      • UINT16

        public static final Type.MetaType UINT16
        SPL uint16 unsigned 16-bit integer. SPL uint16 is mapped to Java's 16-bit signed type in primitive (short) and object form (java.lang.Short) as Java does not support unsigned integral values.
        Any uint16 within an SPL collection type will be represented using java.lang.Short objects and thus contain signed values.
        Applications can handle such values as unsigned values, by converting them to a int (or larger) integer primitive. See Tuple.getShort(int) for details on how uint16 attributes can be retrieved as unsigned values.
        Type information
        SPL type uint16
        Object type java.lang.Short
        Primitive type short
        Type interface Type
      • UINT32

        public static final Type.MetaType UINT32
        SPL uint32 unsigned 32-bit integer. SPL uint32 is mapped to Java's 32-bit signed type in primitive (int) and object form (java.lang.Integer) as Java does not support unsigned integral values.
        Any uint32 within an SPL collection type will be represented using java.lang.Integer objects and thus contain signed values.
        Applications can handle such values as unsigned values, by converting them to a long primitive. See Tuple.getInt(int) for details on how uint32 attributes can be retrieved as unsigned values.
        Type information
        SPL type uint32
        Object type java.lang.Integer
        Primitive type int
        Type interface Type
      • UINT64

        public static final Type.MetaType UINT64
        SPL uint64 unsigned 64-bit integer. SPL uint64 is mapped to Java's 32-bit signed type in primitive (long) and object form (java.lang.Long) as Java does not support unsigned integral values.
        Any uint64 within an SPL collection type will be represented using java.lang.Long objects and thus contain signed values.
        Applications can handle such values as unsigned values, by converting them to a java.math.BigInteger object. See Tuple.getLong(int) for details on how uint64 attributes can be retrieved as unsigned values.
        Type information
        SPL type uint64
        Object type java.lang.Long
        Primitive type long
        Type interface Type
      • FLOAT32

        public static final Type.MetaType FLOAT32
        SPL float32 IEEE 754 binary 32-bit floating point number.
        Type information
        SPL type float32
        Object type java.lang.Float
        Primitive type float
        Type interface Type
      • FLOAT64

        public static final Type.MetaType FLOAT64
        SPL float64 IEEE 754 binary 64-bit floating point number.
        Type information
        SPL type float64
        Object type java.lang.Double
        Primitive type double
        Type interface Type
      • DECIMAL32

        public static final Type.MetaType DECIMAL32
        SPL decimal32 IEEE 754 decimal 32-bit floating point number.
        Type information
        SPL type decimal32
        Object type java.math.BigDecimal
        java.math.MathContext DECIMAL32
        Primitive type none
        Type interface Type
      • DECIMAL64

        public static final Type.MetaType DECIMAL64
        SPL decimal64 IEEE 754 decimal 64-bit floating point number.
        Type information
        SPL type decimal64
        Object type java.math.BigDecimal
        java.math.MathContext DECIMAL64
        Primitive type none
        Type interface Type
      • DECIMAL128

        public static final Type.MetaType DECIMAL128
        SPL decimal128 IEEE 754 decimal 128-bit floating point number.
        Type information
        SPL type decimal128
        Object type java.math.BigDecimal
        java.math.MathContext DECIMAL128
        Primitive type none
        Type interface Type
      • COMPLEX32

        public static final Type.MetaType COMPLEX32
        SPL complex32 32-bit binary floating point complex number.
        Type information
        SPL type complex32
        Object type org.apache.commons.math.complex.Complex
        Primitive type none
        Type interface Type
      • COMPLEX64

        public static final Type.MetaType COMPLEX64
        SPL complex64 64-bit binary floating point complex number.
        Type information
        SPL type complex64
        Object type org.apache.commons.math.complex.Complex
        Primitive type none
        Type interface Type
      • TIMESTAMP

        public static final Type.MetaType TIMESTAMP
        SPL timestamp point in time, with nanosecond precision.
        Type information
        SPL type timestamp
        Object type Timestamp
        Primitive type none
        Type interface Type
      • RSTRING

        public static final Type.MetaType RSTRING
        SPL rstring string of raw 8-bit bytes.
        Type information
        SPL type rstring
        Object type RString
        Primitive type none
        Type interface Type
      • USTRING

        public static final Type.MetaType USTRING
        SPL ustring string of UTF-16 Unicode characters.
        Type information
        SPL type ustring
        Object type java.lang.String
        Primitive type none
        Type interface Type
      • BSTRING

        public static final Type.MetaType BSTRING
        SPL rstring[n] bounded-length string of at most n raw 8-bit bytes.
        Type information
        SPL type rstring[n]
        Object type RString
        Primitive type none
        Type interface Type, BoundedType
      • BLOB

        public static final Type.MetaType BLOB
        SPL blob sequence of bytes.
        Type information
        SPL type blob
        Object type Blob
        Primitive type none
        Type interface Type
      • LIST

        public static final Type.MetaType LIST
        SPL list<T> sequence of elements of SPL type T. Its Java representation as a generic object type depends on the list's element SPL type.
        Type information
        SPL type list<T>
        Object type Depends on the element type T, see Specific List Type Information table
        Primitive type none
        Type interface CollectionType

        Specific List Type Information
        SPL type Object type java.util.List type
        list<boolean> boolean[] List<Boolean>
        list<int8> byte[] List<Byte>
        list<int16> short[] List<Short>
        list<int32> int[] List<Integer>
        list<int64> long[] List<Long>
        list<float32> float[] List<Float>
        list<float64> double[] List<Double>
        list<ustring> String[] List<String>
        list<rstring> java.util.List<RString>
        list<T> java.util.List<Tc>

      • BLIST

        public static final Type.MetaType BLIST
        SPL list<T>[n] bounded list of at most n elements.
        Type information
        SPL type list<T>
        Object type Depends on the element type T, see Specific List Type Information table for LIST
        Primitive type none
        Type interfaces CollectionType, BoundedType
      • SET

        public static final Type.MetaType SET
        SPL set<T> unordered collection elements of SPL type T without duplicates.
        Type information
        SPL type set<T>
        Object type java.util.Set<Tc>
        Primitive type none
        Type interface CollectionType
      • BSET

        public static final Type.MetaType BSET
        SPL set<T>[n] bounded set.
        Type information
        SPL type set<T>
        Object type java.util.Set<Tc>
        Primitive type none
        Type interfaces CollectionType, BoundedType
      • MAP

        public static final Type.MetaType MAP
        SPL map<K,V> unordered mapping from key SPL type K to value SPL type V.
        Type information
        SPL type map<K,V>
        Object type java.util.Map<Kc,Vc>
        Primitive type none
        Type interface MapType
      • BMAP

        public static final Type.MetaType BMAP
        SPL map<K,V>[n] bounded map.
        Type information
        SPL type map<K,V>[n]
        Object type java.util.Map<Kc,Vc>
        Primitive type none
        Type interfaces MapType, BoundedType
      • TUPLE

        public static final Type.MetaType TUPLE
        SPL tuple<T name, ...> sequence of attributes.
        Type information
        SPL type tuple<T name, ...>
        Object type Tuple
        Primitive type none
        Type interface TupleType
      • XML

        public static final Type.MetaType XML
        SPL XML.
        Type information
        SPL type xml
        Object type XML
        Primitive type none
        Type interface XMLType
        Since:
        InfoSphere® Streams Version 3.0
    • Method Detail

      • values

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

        public static Type.MetaType 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
      • getLanguageType

        public final java.lang.String getLanguageType()
        Returns the type name as it appears in SPL, null if it is a composite type that does not have a single representation in SPL.
        Returns:
        SPL name of the type.
      • getMetaTypeInteface

        public final java.lang.Class<? extends Type> getMetaTypeInteface()
        Get the interface that provide the meta-data about the type.
        Returns:
        Type or a sub-interface of Type.
      • isList

        public final boolean isList()
        Is the type a SPL list type.
        Returns:
        True if the type is a list, false otherwise.
      • isMap

        public final boolean isMap()
        Is the type a SPL map type.
        Returns:
        True if the type is a map, false otherwise.
      • isSet

        public final boolean isSet()
        Is the type a SPL set type.
        Returns:
        True if the type is a set, false otherwise.
      • isCollectionType

        public final boolean isCollectionType()
        Is the type a SPL collection type.
        Returns:
        True if the type is a list, set or map type, false otherwise.
      • getMathContext

        public java.math.MathContext getMathContext()
        Return a suitable MathContext. For DECIMAL32, DECIMAL64 and DECIMAL128 the corresponding MathContext field is returned. For non-decimal numeric types MathContext.UNLIMITED is returned. For non-numeric types null is returned,
        Returns:
        Suitable MathContext object for type.