Class OccurrenceComparator
java.lang.Object
net.ontopia.topicmaps.nav.utils.comparators.OccurrenceComparator
- All Implemented Interfaces:
Comparator<OccurrenceIF>
INTERNAL: A Comparator for ordering OccurrenceIFs alphabetically.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionEmpty constructor, used on application startup to initialise a "fast" comparator which will compare Occurrences using no context.OccurrenceComparator(Collection<TopicIF> baseNameContext) Constructor used to make a comparator which will compare Occurrences using the context provided.OccurrenceComparator(Collection<TopicIF> baseNameContext, Collection<TopicIF> variantContext) Constructor used to make a comparator which will compare Occurrences using the context provided. -
Method Summary
Modifier and TypeMethodDescriptionintcompare(OccurrenceIF oc1, OccurrenceIF oc2) Compares two OccurrenceIFs.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Field Details
-
tc
-
-
Constructor Details
-
OccurrenceComparator
public OccurrenceComparator()Empty constructor, used on application startup to initialise a "fast" comparator which will compare Occurrences using no context. -
OccurrenceComparator
Constructor used to make a comparator which will compare Occurrences using the context provided. -
OccurrenceComparator
public OccurrenceComparator(Collection<TopicIF> baseNameContext, Collection<TopicIF> variantContext) Constructor used to make a comparator which will compare Occurrences using the context provided.
-
-
Method Details
-
compare
Compares two OccurrenceIFs.- Specified by:
comparein interfaceComparator<OccurrenceIF>
-