Package com.sun.xml.xsom.util
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 Summary
Constructors Constructor Description TypeSet()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract boolean
contains(XSType type)
Return true if this TypeSet contains the specified type.static TypeSet
intersection(TypeSet a, TypeSet b)
Calculate the TypeSet formed by the intersection of two other TypeSet objects.static TypeSet
union(TypeSet a, TypeSet b)
Calculate the TypeSet formed by the union of two other TypeSet objects.
-
-
-
Method Detail
-
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 TypeSetb
- another TypeSet- Returns:
- the intersection of a and b
-
-