org.norvelle.textcite.model.sort
Class BookSortComparator

java.lang.Object
  extended by org.norvelle.textcite.model.sort.SortComparator
      extended by org.norvelle.textcite.model.sort.BookSortComparator

public abstract class BookSortComparator
extends SortComparator

BookSortComparator: Compares two Citations based on their Book fields. Also provides the ability to signal a listener when the two Citations are not the same. Is abstract because the upon constructing an instance, the using class must implement the method signalChange().

Author:
Erik Norvelle

Field Summary
 
Fields inherited from class org.norvelle.textcite.model.sort.SortComparator
ASCENDING, DESCENDING, direction
 
Constructor Summary
BookSortComparator()
           
BookSortComparator(int direction)
           
 
Method Summary
 int compare(Citation citation1, Citation citation2)
           
 
Methods inherited from class org.norvelle.textcite.model.sort.SortComparator
getDirection, signalChange
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BookSortComparator

public BookSortComparator(int direction)

BookSortComparator

public BookSortComparator()
Method Detail

compare

public int compare(Citation citation1,
                   Citation citation2)
Specified by:
compare in class SortComparator
Returns:
a negative integer, zero, or a positive integer as the first object is less than, equal to, or greater than the second object.