|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.opencms.file.collectors.CmsPriorityDateResourceComparator
public class CmsPriorityDateResourceComparator
Comparator for sorting resource objects based on priority and date.
Serves as Comparator for resources and as comparator key for the resource
at the same time. Uses lazy initializing of comparator keys in a resource.
| Field Summary | |
|---|---|
static java.lang.String |
PROPERTY_DATE
The name of the date property to read. |
| Constructor Summary | |
|---|---|
CmsPriorityDateResourceComparator(CmsObject cms,
boolean asc)
Creates a new instance of this comparator key. |
|
| Method Summary | |
|---|---|
int |
compare(CmsResource res0,
CmsResource res1)
|
long |
getDate()
Returns the date of this resource comparator key. |
int |
getPriority()
Returns the priority of this resource comparator key. |
| 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 |
| Field Detail |
|---|
public static final java.lang.String PROPERTY_DATE
| Constructor Detail |
|---|
public CmsPriorityDateResourceComparator(CmsObject cms,
boolean asc)
cms - the current OpenCms user contextasc - if true, the date sort order is ascending, otherwise descending| Method Detail |
|---|
public int compare(CmsResource res0,
CmsResource res1)
compare in interface java.util.Comparator<CmsResource>Comparator.compare(java.lang.Object, java.lang.Object)public long getDate()
public int getPriority()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||