Class calitha.collections.IComparator
A comparison function, which imposes a total ordering on some collection of objects.
It is based on the
Java Comparator interface.
Defined in: IComparator.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Method Attributes | Method Name and Description |
---|---|
compare(o1, o2)
Compares its two arguments for order.
|
Method Detail
{Boolean}
compare(o1, o2)
Compares its two arguments for order.
- Parameters:
- {Object} o1
- the first object to be compared.
- {Object} o2
- the second object to be compared.
- Returns:
- {Boolean} a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.