|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.hiveutils.util.ClassMatcher
public class ClassMatcher
Utility class to check if the class of an object is a subclass of one class in a list.
Constructor Summary | |
---|---|
ClassMatcher()
|
Method Summary | |
---|---|
java.lang.Object |
get(java.lang.Object o)
Search if an object is an instance of one of the classes added to this ClassMatcher. |
void |
put(java.lang.Class clazz,
java.lang.Object value)
Add a class to the list, associated with a value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ClassMatcher()
Method Detail |
---|
public void put(java.lang.Class clazz, java.lang.Object value)
clazz
- Class to be added to the listvalue
- value to be returned (by get()
when the passed
object is an instance of that class.public java.lang.Object get(java.lang.Object o)
null
is returned.
o
- the object to check against the list of classes
o
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |