Class PageTimeComparator

java.lang.Object
org.apache.wiki.pages.PageTimeComparator
All Implemented Interfaces:
Serializable, Comparator<org.apache.wiki.api.core.Page>

public class PageTimeComparator extends Object implements Comparator<org.apache.wiki.api.core.Page>, Serializable
Compares the lastModified date of its arguments. Both o1 and o2 MUST be WikiPage objects, or else you will receive a ClassCastException.

If the lastModified date is the same, then the next key is the page name. If the page name is also equal, then returns 0 for equality.

See Also:
  • Constructor Details

  • Method Details

    • compare

      public int compare(org.apache.wiki.api.core.Page p1, org.apache.wiki.api.core.Page p2)
      Specified by:
      compare in interface Comparator<org.apache.wiki.api.core.Page>