com.hlcl.rql.util.as
Class HeadlinePageComparator

java.lang.Object
  extended by com.hlcl.rql.util.as.PageComparator
      extended by com.hlcl.rql.util.as.HeadlinePageComparator
All Implemented Interfaces:
java.util.Comparator

public class HeadlinePageComparator
extends PageComparator

Author:
lejafr This class implements the compare method to sort a list of pages by page headline ascending.

Constructor Summary
HeadlinePageComparator()
          Creates a Comparator for sort by page headline.
 
Method Summary
 int comparePages(Page p1, Page p2)
          Compare given pages by the value of the headline.
 
Methods inherited from class com.hlcl.rql.util.as.PageComparator
compare, forceDescendingOrdering
 
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

HeadlinePageComparator

public HeadlinePageComparator()
Creates a Comparator for sort by page headline. Assume ascending ordering per default.

Method Detail

comparePages

public int comparePages(Page p1,
                        Page p2)
Compare given pages by the value of the headline.

Specified by:
comparePages in class PageComparator
Returns:
a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.