Class ClassSet
- java.lang.Object
-
- org.onemind.commons.java.datastructure.ClassSet
-
public class ClassSet extends java.lang.Object
Represents a set of classes. User can use isSubSetOf() to detect whether a given class is subclass of a class in the class set- Version:
- $Id: ClassSet.java,v 1.3 2004/08/26 12:33:16 thlee Exp $ $Name: $
- Author:
- TiongHiang Lee (thlee@onemindsoft.org)
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.HashSet
_classes
the classes *
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(java.lang.Class c)
Add the classvoid
addAll(java.util.Collection classes)
Add all in the classes to the ClassSetjava.util.Set
getClasses()
Get the classesboolean
isSubclassOfClasses(java.lang.Class c)
Check whether the class is subclass of one of the class in the class set
-
-
-
Method Detail
-
addAll
public void addAll(java.util.Collection classes)
Add all in the classes to the ClassSet- Parameters:
classes
- the collection containing the classes
-
add
public void add(java.lang.Class c)
Add the class- Parameters:
c
- the class
-
isSubclassOfClasses
public boolean isSubclassOfClasses(java.lang.Class c)
Check whether the class is subclass of one of the class in the class set- Parameters:
c
- the class- Returns:
- true if is subclass
-
getClasses
public java.util.Set getClasses()
Get the classes- Returns:
- the classes
-
-