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

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

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

A multi-column person category comparator.

See Also:
MultiColumnComparator

Constructor Summary
PersonCategory.Comparator(PersonCategory.SortOption... sortOptions)
          Creates a new person category comparator.
 
Method Summary
 int compare(PersonCategory cat1, PersonCategory cat2)
          Compares two person categories.
 
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

PersonCategory.Comparator

public PersonCategory.Comparator(PersonCategory.SortOption... sortOptions)
Creates a new person category comparator.

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

compare

public int compare(PersonCategory cat1,
                   PersonCategory cat2)
Compares two person categories.

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