com.ibm.streams.operator.meta

Interface EnumType

  • All Superinterfaces:
    Type


    public interface EnumType
    extends Type
    Meta-type for an attribute of type ENUM.
    Since:
    InfoSphere® Streams Version 3.0
    • Method Detail

      • getIdentifiers

        java.util.List<java.lang.String> getIdentifiers()
        Get the list of identifiers declared for this SPL enumeration.
        Returns:
        A read only list of this enumerations identifiers in declared order
      • verifyMapping

        <E extends java.lang.Enum<E>> void verifyMapping(java.lang.Class<E> enumType)
        Verify that the mapping between this SPL's enum identifiers and Java enumeration type E is valid. An enum may be mapped to E if all of its identifiers can be converted to an enumeration value using
        Enum.valueOf(enumType, identifier)
        E may contain constants that do not map to this enum.
        Verifying the mapping ensures that this SPL enum can be safely converted to values E using Tuple.getEnum(Class, int) and OutputTuple.setEnum(Class, int, Enum)
        Type Parameters:
        E - Enumeration type to verify against this SPL enum.
        Parameters:
        enumType - Class of enumeration type to be mapped to.
        Throws:
        java.lang.IllegalArgumentException - SPL enum cannot be mapped to E
      • verifyOrdinals

        <E extends java.lang.Enum<E>> void verifyOrdinals(java.lang.Class<E> enumType)
        Verify that declared order of this SPL's enum identifiers matches order and position of constants for E.
        E may contain constants that do not map to this enum but such constants must have an ordinal value greater or equal to the number of identifiers.
        Type Parameters:
        E - Enumeration type to verify against this SPL enum.
        Parameters:
        enumType - Class of enumeration type to be mapped to.