net.ontopia.topicmaps.utils
Class TypedIFComparator
java.lang.Object
net.ontopia.topicmaps.utils.TypedIFComparator
- All Implemented Interfaces:
- Comparator
public class TypedIFComparator
- extends Object
- implements Comparator
INTERNAL: Comparator that grabs the type of the comparable objects
using TypedIF.getType() , and passes those two topics to it's
subcomparator. Note that this comparator may only be used with
objects that implement TypedIF.
Method Summary |
int |
compare(Object obj1,
Object obj2)
INTERNAL: Compares the given typedIF objects using the
comparator given to the constructor |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
subcomparator
protected Comparator subcomparator
- INTERNAL: The comparator used to compare the types
TypedIFComparator
public TypedIFComparator(Comparator subcomparator)
- INTERNAL: Creates a TypedIfComparator which uses the given comparator
- Parameters:
subcomparator
- the given comparator
compare
public int compare(Object obj1,
Object obj2)
- INTERNAL: Compares the given typedIF objects using the
comparator given to the constructor
- Specified by:
compare
in interface Comparator
- Parameters:
obj1
- an object; typecast to TypedIF by the grabberobj2
- an object; typecast to TypedIF by the grabber
- Returns:
- int; result from the comparator given to the constructor, when it compares the
types of the given objects
Copyright © 2000-2012 Ontopia.