Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.meshcms.core
Class PageInfoComparator

    java.lang.Object
      org.meshcms.core.PageInfoComparator

All Implemented Interfaces:
  java.util.Comparator, java.io.Serializable

public final class PageInfoComparator
extends java.lang.Object
implements java.util.Comparator, java.io.Serializable

Compares two object of type `PageInfo` by comparing paths, scores and hits. This comparator can only be used with pages contained in the site map.

See Also:
  `SiteMap`, Serialized Form

Constructor Summary
`PageInfoComparator(SiteMap siteMap, SiteInfo siteInfo)`

Method Summary
`int` | `compare(java.lang.Object o1, java.lang.Object o2)` Calls `compare(PageInfo, PageInfo)`.
`int` | `compare(PageInfo pageInfo1, PageInfo pageInfo2)` Compares two pages.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface java.util.Comparator
`equals`

Constructor Detail

### PageInfoComparator

    public PageInfoComparator(SiteMap siteMap,
                              SiteInfo siteInfo)

Method Detail

### compare

    public int compare(java.lang.Object o1,
                       java.lang.Object o2)

  Calls `compare(PageInfo, PageInfo)`.

  Specified by:
    `compare` in interface `java.util.Comparator`

### compare

    public int compare(PageInfo pageInfo1,
                       PageInfo pageInfo2)

  Compares two pages. The first criterion is the path of the page: pages are sorted comparing the first different element of the path.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD