com.hlcl.rql.util.as
Class StandardFieldTextPageComparator

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

public class StandardFieldTextPageComparator
extends PageComparator

Author:
lejafr This class implements the compare method to sort a list of pages by a standard field text element. All pages in the list needs to have this text element. Very often they are instances of the same template.

Constructor Summary
StandardFieldTextPageComparator(java.lang.String textTmpltElemName)
          Creates a Comparator for text elements.
 
Method Summary
 int comparePages(Page p1, Page p2)
          Compare given pages by the value of the standard field date element.
 
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

StandardFieldTextPageComparator

public StandardFieldTextPageComparator(java.lang.String textTmpltElemName)
Creates a Comparator for text elements. Assume ascending ordering per default.

Method Detail

comparePages

public int comparePages(Page p1,
                        Page p2)
Compare given pages by the value of the standard field date element.

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.