Class zwt.Comparator
Extends
zwt.Object.
A simple comparator to be used or overridden to compare objects.
Defined in: Comparator.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Construct a comparator.
|
Method Attributes | Method Name and Description |
---|---|
compare(object_o1, object_o2)
Compare two objects.
|
|
Return a comparator that imposes the reverse ordering of the comparator.
|
Method Detail
{Integer}
compare(object_o1, object_o2)
Compare two objects.
- Parameters:
- {Object} object_o1
- The first object
- {Object} object_o2
- The second object
- Returns:
- A negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second
{zwt.Comparator}
reverseOrder()
Return a comparator that imposes the reverse ordering of the comparator.
- Returns:
- a reverse comparator