| Package | com.yworks.bridge.util |
| Class | public class HashMap |
| Inheritance | HashMap AbstractMap YObject Object |
| Implements | Map, Clonable |
| Property | Defined By | ||
|---|---|---|---|
| empty : Boolean [override] [read-only]
Answers if this HashMap has no elements, a size of zero. | HashMap | ||
| Method | Defined By | ||
|---|---|---|---|
HashMap(init:Boolean = true)
Constructs a new empty instance of HashMap. | HashMap | ||
clear():void [override]
Removes all mappings from this HashMap, leaving it empty. | HashMap | ||
clone():Object [override]
Answers a new HashMap with the same mappings and size as this HashMap. | HashMap | ||
containsKey(key:Object):Boolean [override]
Searches this HashMap for the specified key. | HashMap | ||
containsValue(value:Object):Boolean [override]
Searches this HashMap for the specified value. | HashMap | ||
[override]
Answers a Set of the mappings contained in this HashMap. | HashMap | ||
![]() | equals(object:Object):Boolean [override]
Compares the specified object to this Map and answer if they are equal. | AbstractMap | |
getClass():Class [override] | HashMap | ||
getValue(key:Object):Object [override]
Answers the value of the mapping with the specified key. | HashMap | ||
![]() | hashCode():int [override]
Answers an integer hash code for the receiver. | AbstractMap | |
[override]
Answers a Set of the keys contained in this HashMap. | HashMap | ||
[static]
Constructs a new empty instance of HashMap. | HashMap | ||
newHashMap2(capacity:int):HashMap [static]
Constructs a new instance of HashMap with the specified capacity. | HashMap | ||
[static]
Constructs a new instance of HashMap containing the mappings from the specified Map. | HashMap | ||
newHashMap4(capacity:int, loadFactor:Number):HashMap [static]
Constructs a new instance of HashMap with the specified capacity and load factor. | HashMap | ||
[override]
Copies all the mappings in the given map to this map. | HashMap | ||
putValue(key:Object, value:Object):Object [override]
Maps the specified key to the specified value. | HashMap | ||
remove(key:Object):Object [override]
Removes a mapping with the specified key from this HashMap. | HashMap | ||
size():int [override]
Answers the number of mappings in this HashMap. | HashMap | ||
![]() | toString():String
Answers the string representation of this Map. | AbstractMap | |
[override]
Answers a Collection of the values contained in this HashMap. | HashMap | ||
| Method | Defined By | ||
|---|---|---|---|
cloneImpl(o:Object):void [override] | HashMap | ||
![]() | initAbstractMap():void | AbstractMap | |
initHashMap1():void
Initializes this object. | HashMap | ||
initHashMap2(capacity:int):void
Initializes this object. | HashMap | ||
initHashMap3(map:Map):void
Initializes this object. | HashMap | ||
initHashMap4(capacity:int, loadFactor:Number):void
Initializes this object. | HashMap | ||
| empty | property |
empty:Boolean [read-only] [override] Answers if this HashMap has no elements, a size of zero.
public function get empty():BooleanSee also
| HashMap | () | Constructor |
public function HashMap(init:Boolean = true)Constructs a new empty instance of HashMap.
Parametersinit:Boolean (default = true) — An internally used switch to help handle proper instance initialization in inheritance chains where classes can have multiple constructor-like factory methods.
This parameter can safely be ignored/omitted when calling the constructor.
|
| clear | () | method |
override public function clear():voidRemoves all mappings from this HashMap, leaving it empty.
See also
| clone | () | method |
override public function clone():ObjectAnswers a new HashMap with the same mappings and size as this HashMap.
ReturnsObject — a shallow copy of this HashMap
|
See also
| cloneImpl | () | method |
override protected function cloneImpl(o:Object):voidParameters
o:Object |
| containsKey | () | method |
override public function containsKey(key:Object):BooleanSearches this HashMap for the specified key.
Parameters
key:Object — the object to search for
|
Boolean — true if key is a key of this HashMap, false otherwise
|
| containsValue | () | method |
override public function containsValue(value:Object):BooleanSearches this HashMap for the specified value.
Parameters
value:Object — the object to search for
|
Boolean — true if value is a value of this HashMap, false otherwise
|
| entrySet | () | method |
override public function entrySet():SetAnswers a Set of the mappings contained in this HashMap. Each element in the set is a Map.Entry. The set is backed by this HashMap so changes to one are reflected by the other. The set does not support adding.
ReturnsSet — a Set of the mappings
|
| getClass | () | method |
override public function getClass():ClassReturnsClass |
| getValue | () | method |
override public function getValue(key:Object):ObjectAnswers the value of the mapping with the specified key.
Parameters
key:Object — the key
|
Object — the value of the mapping with the specified key
|
| initHashMap1 | () | method |
protected final function initHashMap1():void
Initializes this object. See the documentation of the corresponding factory method newHashMap1() for details.
See also
| initHashMap2 | () | method |
protected final function initHashMap2(capacity:int):void
Initializes this object. See the documentation of the corresponding factory method newHashMap2() for details.
Parameters
capacity:int |
See also
| initHashMap3 | () | method |
protected final function initHashMap3(map:Map):void
Initializes this object. See the documentation of the corresponding factory method newHashMap3() for details.
Parameters
map:Map |
See also
| initHashMap4 | () | method |
protected final function initHashMap4(capacity:int, loadFactor:Number):void
Initializes this object. See the documentation of the corresponding factory method newHashMap4() for details.
Parameters
capacity:int | |
loadFactor:Number |
See also
| keySet | () | method |
override public function keySet():SetAnswers a Set of the keys contained in this HashMap. The set is backed by this HashMap so changes to one are reflected by the other. The set does not support adding.
ReturnsSet — a Set of the keys
|
| newHashMap1 | () | method |
public static function newHashMap1():HashMapConstructs a new empty instance of HashMap.
ReturnsHashMap |
| newHashMap2 | () | method |
public static function newHashMap2(capacity:int):HashMapConstructs a new instance of HashMap with the specified capacity.
Parameters
capacity:int — the initial capacity of this HashMap
|
HashMap |
IllegalArgumentException — when the capacity is less than zero
|
| newHashMap3 | () | method |
public static function newHashMap3(map:Map):HashMapConstructs a new instance of HashMap containing the mappings from the specified Map.
Parameters
map:Map — the mappings to add
|
HashMap |
| newHashMap4 | () | method |
public static function newHashMap4(capacity:int, loadFactor:Number):HashMapConstructs a new instance of HashMap with the specified capacity and load factor.
Parameters
capacity:int — the initial capacity
| |
loadFactor:Number — the initial load factor
|
HashMap |
IllegalArgumentException — when the capacity is less than zero or the load factor is less or equal to zero
|
| putAll | () | method |
override public function putAll(map:Map):voidCopies all the mappings in the given map to this map. These mappings will replace all mappings that this map had for any of the keys currently in the given map.
Parameters
map:Map — the Map to copy mappings from
|
ReferenceError — if the given map is null
|
| putValue | () | method |
override public function putValue(key:Object, value:Object):ObjectMaps the specified key to the specified value.
Parameters
key:Object — the key
| |
value:Object — the value
|
Object — the value of any previous mapping with the specified key or null if there was no mapping
|
| remove | () | method |
override public function remove(key:Object):ObjectRemoves a mapping with the specified key from this HashMap.
Parameters
key:Object — the key of the mapping to remove
|
Object — the value of the removed mapping or null if key is not a key in this HashMap
|
| size | () | method |
override public function size():intAnswers the number of mappings in this HashMap.
Returnsint — the number of mappings in this HashMap
|
| values | () | method |
override public function values():CollectionAnswers a Collection of the values contained in this HashMap. The collection is backed by this HashMap so changes to one are reflected by the other. The collection does not support adding.
ReturnsCollection — a Collection of the values
|