edu.northwestern.at.monk.model
Class Lemma.Comparator

java.lang.Object
  extended by edu.northwestern.at.monk.model.MultiColumnComparator
      extended by edu.northwestern.at.monk.model.Lemma.Comparator
All Implemented Interfaces:
java.util.Comparator<Lemma>
Enclosing class:
Lemma

public static class Lemma.Comparator
extends MultiColumnComparator
implements java.util.Comparator<Lemma>

A multi-column lemma comparator.

See Also:
MultiColumnComparator

Constructor Summary
Lemma.Comparator(Lemma.SortOption... sortOptions)
          Creates a new lemma comparator.
 
Method Summary
 int compare(Lemma l1, Lemma l2)
          Compares two lemmas.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Constructor Detail

Lemma.Comparator

public Lemma.Comparator(Lemma.SortOption... sortOptions)
Creates a new lemma comparator.

Parameters:
sortOptions - Lemma sort options, or null to use the natural ordering.
Method Detail

compare

public int compare(Lemma l1,
                   Lemma l2)
Compares two lemmas.

Specified by:
compare in interface java.util.Comparator<Lemma>
Parameters:
l1 - First lemma.
l2 - Second lemma.
Returns:
A negative integer, zero, or a positive integer as the first lemma is less than, equal to, or greater than the second lemma according to the sort options.