Packagesystem
Interfacepublic interface Comparator
Implementors AlphaComparator, BooleanComparator, CharComparator, ComparableComparator, DateComparator, GenericComparator, NullComparator, NumberComparator, PriorityComparator, ReverseComparator, StringComparator

A comparison function, which imposes a total ordering on some collection of objects.



Public Methods
 MethodDefined By
  
compare(o1:*, o2:*, options:* = null):int
Compares two arguments for order.
Comparator
Method Detail
compare()method
public function compare(o1:*, o2:*, options:* = null):int

Compares two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.

Parameters

o1:* — The first object to compare.
 
o2:* — The second object to compare.
 
options:* (default = null) — An optional object used to compare the two objects.

Returns
int — A negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.