com.compoze.collab
Class ItemComparator
java.lang.Object
com.compoze.collab.ItemComparator
- All Implemented Interfaces:
- java.util.Comparator
public class ItemComparator
- extends java.lang.Object
- implements java.util.Comparator
Comparator for arbitrary properties on items. Items are compared by one
or more property values. The following sort criteria is used for each of the
different property value types:
Method Summary |
int |
compare(java.lang.Object o1,
java.lang.Object o2)
|
boolean |
equals(java.lang.Object obj)
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ItemComparator
public ItemComparator(SortProperty[] sortProps)
- Constructor (default
Collator
).
- Parameters:
sortProps
- the sort properties (not null
).
Properties earlier in the array have higher sort priority.
ItemComparator
public ItemComparator(SortProperty[] sortProps,
java.text.Collator collator)
- Constructor.
- Parameters:
sortProps
- the sort properties (not null
).
Properties earlier in the array have higher sort priority.collator
- the collator for comparing
String
values (null
for default
Collator
)
compare
public int compare(java.lang.Object o1,
java.lang.Object o2)
- Specified by:
compare
in interface java.util.Comparator
- See Also:
(Object, Object)
equals
public boolean equals(java.lang.Object obj)
- Specified by:
equals
in interface java.util.Comparator
- Overrides:
equals
in class java.lang.Object
- See Also:
Object.equals(java.lang.Object)
Copyright ©1999-2008 Oracle All rights reserved.