public class CmsPropertyResourceComparator extends java.lang.Object implements java.io.Serializable, java.util.Comparator<CmsResource>
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.
构造器和说明 |
---|
CmsPropertyResourceComparator(CmsObject cms,
java.lang.String property,
boolean asc)
Creates a new instance of this comparator key.
|
限定符和类型 | 方法和说明 |
---|---|
int |
compare(CmsResource res0,
CmsResource res1) |
java.lang.String |
getPropertyValue()
Returns the property value of this resource comparator key.
|
public CmsPropertyResourceComparator(CmsObject cms, java.lang.String property, boolean asc)
cms
- the current OpenCms user contextproperty
- the name of the sort property (case sensitive)asc
- the sort order (true=asc, false=desc)public int compare(CmsResource res0, CmsResource res1)
compare
在接口中 java.util.Comparator<CmsResource>
Comparator.compare(java.lang.Object, java.lang.Object)
public java.lang.String getPropertyValue()