net.ontopia.topicmaps.nav.utils.comparators
Class TopicComparator
java.lang.Object
net.ontopia.topicmaps.nav.utils.comparators.TopicComparator
- All Implemented Interfaces:
- java.util.Comparator
- Direct Known Subclasses:
- OccTypeComparator
public class TopicComparator
- extends java.lang.Object
- implements java.util.Comparator
INTERNAL: A Comparator for ordering topics alphabetically. Note that
it does not look up the 'sort' topic for you, but that this must be
provided explicitly to the constructors.
Constructor Summary |
TopicComparator()
Empty constructor, used on application startup to initialise a
"fast" comparator which will compare Topics using no context. |
TopicComparator(java.util.Collection baseNameContext)
Constructor used to make a comparator which will compare Topics using the
contexts provided. |
TopicComparator(java.util.Collection baseNameContext,
java.util.Collection variantNameContext)
Constructor used to make a comparator which will compare Topics
using the contexts provided. |
Method Summary |
int |
compare(java.lang.Object o1,
java.lang.Object o2)
implementing method which is required for Comparator interface. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.Comparator |
equals |
nameGrabber
protected GrabberIF nameGrabber
nameStringifier
protected StringifierIF nameStringifier
TopicComparator
public TopicComparator()
- Empty constructor, used on application startup to initialise a
"fast" comparator which will compare Topics using no context.
TopicComparator
public TopicComparator(java.util.Collection baseNameContext)
- Constructor used to make a comparator which will compare Topics using the
contexts provided.
TopicComparator
public TopicComparator(java.util.Collection baseNameContext,
java.util.Collection variantNameContext)
- Constructor used to make a comparator which will compare Topics
using the contexts provided. The variantNameContext will
generally be a Sort topic if is available. This is the default
applied by the application.
compare
public int compare(java.lang.Object o1,
java.lang.Object o2)
- implementing method which is required for Comparator interface.
- Specified by:
compare
in interface java.util.Comparator
Copyright © 2000-2012 Ontopia.