Interface UnionType

  • All Superinterfaces:
    MetadataType
    All Known Implementing Classes:
    DefaultUnionType

    public interface UnionType
    extends MetadataType
    For any types X and Y, the union, or disjunction, X|Y, of the types may be formed. A union type is a supertype of both of the given types X and Y, and an instance of either type is an instance of the union type.

    Note: the type expression X|Y is pronounced “x or y”.

    • Method Detail

      • getTypes

        List<MetadataType> getTypes()
        The list of types that belongs to this union.
        Returns:
        The list of types