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

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

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

A multi-column author comparator.

See Also:
MultiColumnComparator

Constructor Summary
Author.Comparator(Author.SortOption... sortOptions)
          Creates a new author comparator.
 
Method Summary
 int compare(Author a1, Author a2)
          Compares two authors.
 
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

Author.Comparator

public Author.Comparator(Author.SortOption... sortOptions)
Creates a new author comparator.

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

compare

public int compare(Author a1,
                   Author a2)
Compares two authors.

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