| Package | vegas.util.comparators |
| Class | public class ComparableComparator |
| Inheritance | ComparableComparator CoreObject |
| Implements | ICloneable, IComparator, ICopyable |
| Method | Defined by | ||
|---|---|---|---|
|
Creates a new ComparableComparator instance.
| ComparableComparator | ||
|
clone():*
Creates and returns a shallow copy of the object.
| ComparableComparator | ||
|
compare(o1:*, o2:*):int
Returns an integer value to compare two objects in parameters.
| ComparableComparator | ||
|
copy():*
Creates and returns a deep copy of the object.
| ComparableComparator | ||
|
[static]
Returns the singleton instance of a ComparableComparator.
| ComparableComparator | ||
![]() |
Returns the internal
ILogger reference of this ILogable object. | CoreObject | |
![]() |
hashCode():uint
Returns a hashcode value for the object.
| CoreObject | |
![]() |
Sets the internal
ILogger reference of this ILogable object. | CoreObject | |
![]() |
toSource(indent:int = 0):String
Returns the string representation the source code of the object.
| CoreObject | |
![]() |
toString():String
Returns the string representation of this instance.
| CoreObject | |
| ComparableComparator | () | constructor |
public function ComparableComparator()Creates a new ComparableComparator instance. This constructor whose use should be avoided.
| clone | () | method |
public function clone():*Creates and returns a shallow copy of the object.
Returns* — A new object that is a shallow copy of this instance.
|
| compare | () | method |
public function compare(o1:*, o2:*):intReturns an integer value to compare two objects in parameters.
Parameterso1:* — the first object to compare.
|
|
o2:* — the second object to compare.
|
int —
|
— when the o1 object is null or undefined.
|
|
— it the o1 object is not a IComparable object.
|
| copy | () | method |
public function copy():*Creates and returns a deep copy of the object.
Returns* — A new object that is a deep copy of this instance.
|
| getInstance | () | method |
public static function getInstance():ComparableComparatorReturns the singleton instance of a ComparableComparator. Developers are encouraged to use the comparator returned from this method instead of constructing a new instance to reduce allocation and GC overhead when multiple comparable comparators may be used in the same application.
ReturnsComparableComparator —
the singleton instance of a ComparableComparator.
|