|
Compoze Software, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.compoze.collab.ItemComparator
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:
Value Type | Sort Criteria |
Key.VALUE_STRING
| Comparable
|
Key.VALUE_SHORT
| Comparable
|
Key.VALUE_INTEGER
| Comparable
|
Key.VALUE_LONG
| Comparable
|
Key.VALUE_BOOLEAN
| false < true
|
Key.VALUE_FLOAT
| Comparable
|
Key.VALUE_DOUBLE
| Comparable
|
Key.VALUE_BINARY
| IllegalArgumentException
|
Key.VALUE_DATE
| Comparable
|
Key.VALUE_ITEM
| IllegalArgumentException
|
Key.VALUE_ENUMELEMENT
| Comparable
|
Key.VALUE_UNKNOWN
| Comparable or
IllegalArgumentException if unknown objects do
not implement Comparable
|
Key.VALUE_SERIALIZABLE
| Comparable or
IllegalArgumentException if serialized objects do
not implement Comparable
|
Constructor Summary | |
ItemComparator(SortProperty[] sortProps)
Constructor. |
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 |
Constructor Detail |
public ItemComparator(SortProperty[] sortProps)
sortProps
- the sort properties (not null
).
Properties earlier in the array have higher sort priority.Method Detail |
public int compare(java.lang.Object o1, java.lang.Object o2)
compare
in interface java.util.Comparator
(Object, Object)
public boolean equals(java.lang.Object obj)
equals
in interface java.util.Comparator
equals
in class java.lang.Object
Object.equals(java.lang.Object)
|
Compoze Software, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |