public class TopicComparator extends Object implements Comparator<TopicIF>
Modifier and Type | Class and Description |
---|---|
static class |
TopicComparator.ComparatorNameStringifier
INTERNAL: Stringifier that stringifies TopicNameIFs and VariantNameIFs.
|
Modifier and Type | Field and Description |
---|---|
protected Function<TopicIF,NameIF> |
nameGrabber |
protected Function<NameIF,String> |
nameStringifier |
Constructor and Description |
---|
TopicComparator()
Empty constructor, used on application startup to initialise a
"fast" comparator which will compare Topics using no context.
|
TopicComparator(Collection<TopicIF> baseNameContext)
Constructor used to make a comparator which will compare Topics using the
contexts provided.
|
TopicComparator(Collection<TopicIF> baseNameContext,
Collection<TopicIF> variantNameContext)
Constructor used to make a comparator which will compare Topics
using the contexts provided.
|
Modifier and Type | Method and Description |
---|---|
int |
compare(TopicIF o1,
TopicIF o2)
implementing method which is required for Comparator interface.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
public TopicComparator()
public TopicComparator(Collection<TopicIF> baseNameContext)
public TopicComparator(Collection<TopicIF> baseNameContext, Collection<TopicIF> variantNameContext)
public int compare(TopicIF o1, TopicIF o2)
compare
in interface Comparator<TopicIF>