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
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 |
PageInfoComparator
public PageInfoComparator(SiteMap siteMap,
SiteInfo siteInfo)
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.