XSOM 20110809-redhat-3

com.sun.xml.xsom.util
Class TypeSet

java.lang.Object
  extended by 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
TypeSet()
           
 
Method Summary
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TypeSet

public TypeSet()
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 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

XSOM 20110809-redhat-3

Copyright © 2012 Oracle. All Rights Reserved.