Class TypeSet

java.lang.Object
com.sun.xml.xsom.util.TypeSet
Direct Known Subclasses:
SimpleTypeSet, TypeClosure

public abstract class TypeSet extends Object
A simple abstraction for a set of Types that defines containment functions.
Author:
Ryan Shoemaker, Sun Microsystems, Inc.
  • Constructor Details

    • TypeSet

      public TypeSet()
  • Method Details

    • contains

      public abstract boolean contains(XSType type)
      Return true if this TypeSet contains the specified type. Concrete implementations of this method determine what it means for the TypeSet to "contain" a type.
      Parameters:
      type - the type
      Returns:
      true iff this TypeSet contains the specified type
    • intersection

      public static TypeSet intersection(TypeSet a, TypeSet b)
      Calculate the TypeSet formed by the intersection of two other TypeSet objects.
      Parameters:
      a - a TypeSet
      b - another TypeSet
      Returns:
      the intersection of a and b
    • union

      public static TypeSet union(TypeSet a, TypeSet b)
      Calculate the TypeSet formed by the union of two other TypeSet objects.
      Parameters:
      a - a TypeSet
      b - another TypeSet
      Returns:
      the union of a and b