org.onemind.commons.java.datastructure
Class ClassSet

java.lang.Object
  extended byorg.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)

Constructor Summary
ClassSet()
          {@inheritDoc}
ClassSet(java.util.Collection c)
          {@inheritDoc}
 
Method Summary
 void add(java.lang.Class c)
          Add the class
 void addAll(java.util.Collection classes)
          Add all in the classes to the ClassSet
 java.util.Set getClasses()
          Get the classes
 boolean isSubclassOfClasses(java.lang.Class c)
          Check whether the class is subclass of one of the class in the class set
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassSet

public ClassSet()
{@inheritDoc}


ClassSet

public ClassSet(java.util.Collection c)
{@inheritDoc}

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


Copyright © 2004-2006 . All Rights Reserved.