Packageorg.as3coreaddendum.system.comparators
Classpublic class PriorityComparator
InheritancePriorityComparator Inheritance Object
Implements IComparator

A comparator for objects that implements the org.as3coreaddendum.system.IPriority interface, comparing the priority property.

See also

IComparator
IPriority


Public Methods
 MethodDefined By
  
Constructor, creates a new PriorityComparator object.
PriorityComparator
  
compare(o1:*, o2:*):int
Performs the comparison between the two arguments.
PriorityComparator
Constructor Detail
PriorityComparator()Constructor
public function PriorityComparator()

Constructor, creates a new PriorityComparator object.

Method Detail
compare()method
public function compare(o1:*, o2:*):int

Performs the comparison between the two arguments.

Parameters

o1:* — The first Number object to be compared.
 
o2:* — The second Number object to be compared.

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

Throws
ArgumentError — if any of the arguments does not implements the IPriority interface.