gate.util.persistence
Class PersistenceManager.ClassComparator
java.lang.Object
gate.util.persistence.PersistenceManager.ClassComparator
- All Implemented Interfaces:
- Comparator
- Enclosing class:
- PersistenceManager
public static class PersistenceManager.ClassComparator
- extends Object
- implements Comparator
Method Summary |
int |
compare(Object o1,
Object o2)
Compares two Class values in terms of specificity; the
more specific class is said to be "smaller" than the
more generic one hence the Object class is the
"largest" possible class. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PersistenceManager.ClassComparator
public PersistenceManager.ClassComparator()
compare
public int compare(Object o1,
Object o2)
- Compares two
Class
values in terms of specificity; the
more specific class is said to be "smaller" than the
more generic one hence the Object
class is the
"largest" possible class. When two classes are not
comparable (i.e. not assignable from each other) in either
direction a NotComparableException will be thrown. both input
objects should be Class values otherwise a
ClassCastException
will be thrown.
- Specified by:
compare
in interface Comparator