Package | org.as3collections.maps |
Class | public class ReadOnlyArrayListMap |
Inheritance | ReadOnlyArrayListMap AbstractListMap Object |
ArrayListMap
that doesn't allow modifications.
It receives all the mappings by its constructor and can no longer be changed.
All methods that change the map will throw an UnsupportedOperationError
.
Method | Defined By | ||
---|---|---|---|
ReadOnlyArrayListMap(source:IMap)
Constructor, creates a new ReadOnlyArrayListMap object. | ReadOnlyArrayListMap | ||
clear():void [override]
This implementation always throws an UnsupportedOperationError. | ReadOnlyArrayListMap | ||
clone():* [override]
Creates and return a new ReadOnlyArrayListMap object containing all mappings in this map (in the same order). | ReadOnlyArrayListMap | ||
containsKey(key:*):Boolean
Returns true if this map contains a mapping for the specified key. | AbstractListMap | ||
containsValue(value:*):Boolean
Returns true if this map maps one or more keys to the specified value. | AbstractListMap | ||
Returns an ArrayList object that is a view of the mappings contained in this map (in the same order). | AbstractListMap | ||
equals(other:*):Boolean
This method uses MapUtil.equalConsideringOrder method to perform equality, sending this map and other argument. | AbstractListMap | ||
getKeyAt(index:int):*
Returns the key at the specified position in this map. | AbstractListMap | ||
Returns an ArrayList object that is a view of the keys contained in this map. | AbstractListMap | ||
getValue(key:*):*
Returns the value to which the specified key is mapped, or null if this map contains no mapping for the key. | AbstractListMap | ||
getValueAt(index:int):*
Returns the value at the specified position in this map. | AbstractListMap | ||
Returns an ArrayList object that is a view of the values contained in this map. | AbstractListMap | ||
Returns a new IListMap object that is a view of the portion of this map whose keys are strictly less than toKey. | AbstractListMap | ||
indexOfKey(key:*):int
Returns the position of the specified key. | AbstractListMap | ||
indexOfValue(value:*):int
Returns the position of the specified value. | AbstractListMap | ||
isEmpty():Boolean
Returns true if this map contains no key-value mappings. | AbstractListMap | ||
[override]
Returns an iterator over a set of mappings. | ReadOnlyArrayListMap | ||
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. | AbstractListMap | ||
put(key:*, value:*):* [override]
This implementation always throws an UnsupportedOperationError. | ReadOnlyArrayListMap | ||
[override]
This implementation always throws an UnsupportedOperationError. | ReadOnlyArrayListMap | ||
Copies all of the mappings from the specified map to this map (optional operation). | AbstractListMap | ||
putAllByObject(o:Object):void [override]
This implementation always throws an UnsupportedOperationError. | ReadOnlyArrayListMap | ||
putAt(index:int, key:*, value:*):void
Associates the specified value with the specified key at the specified position in this map (optional operation). | AbstractListMap | ||
[override]
This implementation always throws an UnsupportedOperationError. | ReadOnlyArrayListMap | ||
remove(key:*):* [override]
This implementation always throws an UnsupportedOperationError. | ReadOnlyArrayListMap | ||
removeAll(keys:ICollection):Boolean [override]
This implementation always throws an UnsupportedOperationError. | ReadOnlyArrayListMap | ||
Removes the mapping at the specified position in this map (optional operation). | AbstractListMap | ||
removeRange(fromIndex:int, toIndex:int):IListMap
Removes all of the mappings whose index is between fromIndex, inclusive, and toIndex, exclusive (optional operation). | AbstractListMap | ||
retainAll(keys:ICollection):Boolean [override]
This implementation always throws an UnsupportedOperationError. | ReadOnlyArrayListMap | ||
reverse():void
Reverses the order of the mappings in this map. | AbstractListMap | ||
setKeyAt(index:int, key:*):*
Replaces the key at the specified position in this map with the specified key (optional operation). | AbstractListMap | ||
setValueAt(index:int, value:*):*
Replaces the value at the specified position in this map with the specified value (optional operation). | AbstractListMap | ||
size():int
Returns the number of key-value mappings in this map. | AbstractListMap | ||
Returns a new map that is a view of the portion of this map between the specified fromIndex, inclusive, and toIndex, exclusive. | AbstractListMap | ||
Returns a new IListMap object that is a view of the portion of this map whose keys are greater than or equal to fromKey. | AbstractListMap | ||
toString():String
Returns the string representation of this instance. | AbstractListMap |
ReadOnlyArrayListMap | () | Constructor |
public function ReadOnlyArrayListMap(source:IMap)
Constructor, creates a new ReadOnlyArrayListMap
object.
source:IMap — an map to fill the list.
|
ArgumentError — if the source argument is null .
|
clear | () | method |
override public function clear():void
This implementation always throws an UnsupportedOperationError
.
org.as3coreaddendum.errors:UnsupportedOperationError — ReadOnlyArrayListMap is a read-only map and doesn't allow modifications.
|
clone | () | method |
override public function clone():*
Creates and return a new ReadOnlyArrayListMap
object containing all mappings in this map (in the same order).
* — a new ReadOnlyArrayListMap object containing all mappings in this map (in the same order).
|
iterator | () | method |
override public function iterator():IIterator
Returns an iterator over a set of mappings.
This implementation returns a ReadOnlyMapIterator
object.
IIterator — an iterator over a set of values.
|
See also
put | () | method |
override public function put(key:*, value:*):*
This implementation always throws an UnsupportedOperationError
.
Parameters
key:* | |
value:* |
* —
|
org.as3coreaddendum.errors:UnsupportedOperationError — ReadOnlyArrayListMap is a read-only map and doesn't allow modifications.
|
putAll | () | method |
override public function putAll(map:IMap):void
This implementation always throws an UnsupportedOperationError
.
Parameters
map:IMap |
org.as3coreaddendum.errors:UnsupportedOperationError — ReadOnlyArrayListMap is a read-only map and doesn't allow modifications.
|
putAllByObject | () | method |
override public function putAllByObject(o:Object):void
This implementation always throws an UnsupportedOperationError
.
Parameters
o:Object |
org.as3coreaddendum.errors:UnsupportedOperationError — ReadOnlyArrayListMap is a read-only map and doesn't allow modifications.
|
putEntry | () | method |
override public function putEntry(entry:IMapEntry):*
This implementation always throws an UnsupportedOperationError
.
Parameters
entry:IMapEntry |
* —
|
org.as3coreaddendum.errors:UnsupportedOperationError — ReadOnlyArrayListMap is a read-only map and doesn't allow modifications.
|
remove | () | method |
override public function remove(key:*):*
This implementation always throws an UnsupportedOperationError
.
Parameters
key:* |
* —
|
org.as3coreaddendum.errors:UnsupportedOperationError — ReadOnlyArrayListMap is a read-only map and doesn't allow modifications.
|
removeAll | () | method |
override public function removeAll(keys:ICollection):Boolean
This implementation always throws an UnsupportedOperationError
.
Parameters
keys:ICollection |
Boolean —
|
org.as3coreaddendum.errors:UnsupportedOperationError — ReadOnlyArrayListMap is a read-only map and doesn't allow modifications.
|
retainAll | () | method |
override public function retainAll(keys:ICollection):Boolean
This implementation always throws an UnsupportedOperationError
.
Parameters
keys:ICollection |
Boolean —
|
org.as3coreaddendum.errors:UnsupportedOperationError — ReadOnlyArrayListMap is a read-only map and doesn't allow modifications.
|
import org.as3collections.IMap; import org.as3collections.maps.ArrayListMap; import org.as3collections.maps.ReadOnlyArrayListMap; var map1:IMap = new ArrayListMap(); map1.put("fa", "fb"): // null map1.put("ga", "gb"): // null map1.put("ha", "hb"): // null map1 // {fa=fb,ga=gb,ha=hb} map1.size() // 3 var map2:IMap = new ReadOnlyArrayListMap(map1); map2 // {fa=fb,ga=gb,ha=hb} map2.size() // 3 map2.put(1, 2) // UnsupportedOperationError: ReadOnlyArrayListMap is a read-only map and doesn't allow modifications. map2.remove(1) // UnsupportedOperationError: ReadOnlyArrayListMap is a read-only map and doesn't allow modifications.