Package | org.as3collections |
Interface | public interface ISortedMap extends org.as3coreaddendum.system.ISortable, IListMap, IMap, IIterable, org.as3coreaddendum.system.ICloneable, org.as3coreaddendum.system.IEquatable |
Implementors | SortedArrayListMap, TypedSortedMap |
sort
or sortOn
methods.
The sortBy
property defines whether the sorting will be made by key
or value
.
Property | Defined By | ||
---|---|---|---|
allKeysEquatable : Boolean [read-only]
Indicates whether all keys in this map implements org.as3coreaddendum.system.IEquatable interface. | IMap | ||
allValuesEquatable : Boolean [read-only]
Indicates whether all values in this map implements org.as3coreaddendum.system.IEquatable interface. | IMap | ||
modCount : int [read-only]
The number of times this map has been structurally modified. | IListMap | ||
sortBy : SortMapBy
Defines whether the map should be sorted by its keys or values. | ISortedMap |
Method | Defined By | ||
---|---|---|---|
clear():void
Removes all of the mappings from this map (optional operation). | IMap | ||
containsKey(key:*):Boolean
Returns true if this map contains a mapping for the specified key. | IMap | ||
containsValue(value:*):Boolean
Returns true if this map maps one or more keys to the specified value. | IMap | ||
Returns an ICollection object that is a view of the mappings contained in this map. | IMap | ||
getKeyAt(index:int):*
Returns the key at the specified position in this map. | IListMap | ||
Returns an ICollection object that is a view of the keys contained in this map. | IMap | ||
getValue(key:*):*
Returns the value to which the specified key is mapped, or null if this map contains no mapping for the key. | IMap | ||
getValueAt(index:int):*
Returns the value at the specified position in this map. | IListMap | ||
Returns an ICollection object that is a view of the values contained in this map. | IMap | ||
Returns a new IListMap object that is a view of the portion of this map whose keys are strictly less than toKey. | IListMap | ||
indexOfKey(key:*):int
Returns the index of the first occurrence of the specified key in this map, or -1 if this map does not contain the key. | IListMap | ||
indexOfValue(value:*):int
Returns the index of the first occurrence of the specified value in this map, or -1 if this map does not contain the value. | IListMap | ||
isEmpty():Boolean
Returns true if this map contains no key-value mappings. | IMap | ||
Returns an iterator over a set of elements. | IIterable | ||
listMapIterator(index:int = 0):IListMapIterator
Returns a IListMapIterator object to iterate over the mappings in this map (in proper sequence), starting at the specified position in this map. | IListMap | ||
put(key:*, value:*):*
Associates the specified value with the specified key in this map (optional operation). | IMap | ||
Copies all of the mappings from the specified map to this map (optional operation). | IMap | ||
Copies all of the mappings from the specified map to this map (optional operation). | IListMap | ||
putAllByObject(o:Object):void
Retrieves each property of the specified object, calling put on this map once for each property (optional operation). | IMap | ||
putAt(index:int, key:*, value:*):void
Associates the specified value with the specified key at the specified position in this map (optional operation). | IListMap | ||
Associates the specified entry.value with the specified entry.key in this map (optional operation). | IMap | ||
remove(key:*):*
Removes the mapping for a key from this map if it is present (optional operation). | IMap | ||
removeAll(keys:ICollection):Boolean
Removes the mapping for a key from this map (if it is present) for each element in the specified collection (optional operation). | IMap | ||
Removes the mapping at the specified position in this map (optional operation). | IListMap | ||
removeRange(fromIndex:int, toIndex:int):IListMap
Removes all of the mappings whose index is between fromIndex, inclusive, and toIndex, exclusive (optional operation). | IListMap | ||
retainAll(keys:ICollection):Boolean
Retains only the mappings in this map that the keys are contained (as elements) in the specified collection (optional operation). | IMap | ||
reverse():void
Reverses the order of the mappings in this map. | IListMap | ||
setKeyAt(index:int, key:*):*
Replaces the key at the specified position in this map with the specified key (optional operation). | IListMap | ||
setValueAt(index:int, value:*):*
Replaces the value at the specified position in this map with the specified value (optional operation). | IListMap | ||
size():int
Returns the number of key-value mappings in this map. | IMap | ||
sortOn(fieldName:*, options:* = null):Array
Sorts the elements in an array according to one or more fields in the array. | ISortedMap | ||
Returns a new IListMap object that is a view of the portion of this map between the specified fromIndex, inclusive, and toIndex, exclusive. | IListMap | ||
Returns a new IListMap object that is a view of the portion of this map whose keys are greater than or equal to fromKey. | IListMap |
sortBy | property |
sortBy:SortMapBy
Defines whether the map should be sorted by its keys or values. The default is SortMapBy.KEY
.
public function get sortBy():SortMapBy
public function set sortBy(value:SortMapBy):void
sortOn | () | method |
public function sortOn(fieldName:*, options:* = null):Array
Sorts the elements in an array according to one or more fields in the array.
Consult Array.sortOn
in the ActionScript 3.0 Language Reference in the link below for more info.
Parameters
fieldName:* | |
options:* (default = null )
|
Array —
|
See also