Packagecom.yworks.bridge.util
Interfacepublic interface Map
Implementors AbstractMap, HashMap

Map has a set of keys, each key is mapped to a single value.



Public Properties
 PropertyDefined By
  empty : Boolean
[read-only] Answers if this Map has no elements, a size of zero.
Map
Public Methods
 MethodDefined By
  
clear():void
Removes all elements from this Map, leaving it empty.
Map
  
containsKey(key:Object):Boolean
Searches this Map for the specified key.
Map
  
containsValue(value:Object):Boolean
Searches this Map for the specified value.
Map
  
Returns a Set whose elements comprise all of the mappings that are to be found in this Map.
Map
  
getValue(key:Object):Object
Answers the value of the mapping with the specified key.
Map
  
Answers a Set of the keys contained in this Map.
Map
  
putAll(map:Map):void
Copies every mapping in the specified Map to this Map.
Map
  
putValue(key:Object, value:Object):Object
Maps the specified key to the specified value.
Map
  
remove(key:Object):Object
Removes a mapping with the specified key from this Map.
Map
  
size():int
Answers the number of elements in this Map.
Map
  
Returns all of the current Map values in a Collection.
Map
Property Detail
emptyproperty
empty:Boolean  [read-only]

Answers if this Map has no elements, a size of zero.


Implementation
    public function get empty():Boolean

See also

Method Detail
clear()method
public function clear():void

Removes all elements from this Map, leaving it empty.


Throws
flash.errors:IllegalOperationError — when removing from this Map is not supported

See also

containsKey()method 
public function containsKey(key:Object):Boolean

Searches this Map for the specified key.

Parameters

key:Object — the object to search for

Returns
Boolean — true if key is a key of this Map, false otherwise
containsValue()method 
public function containsValue(value:Object):Boolean

Searches this Map for the specified value.

Parameters

value:Object — the object to search for

Returns
Boolean — true if value is a value of this Map, false otherwise
entrySet()method 
public function entrySet():Set

Returns a Set whose elements comprise all of the mappings that are to be found in this Map. Information on each of the mappings is encapsulated in a separate com.yworks.bridge.util.MapEntry instance. As the Set is backed by this Map, users should be aware that changes in one will be immediately visible in the other.

Returns
Set — a Set of the mappings

See also

getValue()method 
public function getValue(key:Object):Object

Answers the value of the mapping with the specified key.

Parameters

key:Object — the key

Returns
Object — the value of the mapping with the specified key
keySet()method 
public function keySet():Set

Answers a Set of the keys contained in this Map. The set is backed by this Map so changes to one are reflected by the other. The set does not support adding.

Returns
Set — a Set of the keys
putAll()method 
public function putAll(map:Map):void

Copies every mapping in the specified Map to this Map.

Parameters

map:Map — the Map to copy mappings from


Throws
flash.errors:IllegalOperationError — when adding to this Map is not supported
 
TypeError — when the class of a key or value is inappropriate for this Map
 
IllegalArgumentException — when a key or value cannot be added to this Map
 
ReferenceError — when a key or value is null and this Map does not support null keys or values
putValue()method 
public function putValue(key:Object, value:Object):Object

Maps the specified key to the specified value.

Parameters

key:Object — the key
 
value:Object — the value

Returns
Object — the value of any previous mapping with the specified key or null if there was no mapping

Throws
flash.errors:IllegalOperationError — when adding to this Map is not supported
 
TypeError — when the class of the key or value is inappropriate for this Map
 
IllegalArgumentException — when the key or value cannot be added to this Map
 
ReferenceError — when the key or value is null and this Map does not support null keys or values
remove()method 
public function remove(key:Object):Object

Removes a mapping with the specified key from this Map.

Parameters

key:Object — the key of the mapping to remove

Returns
Object — the value of the removed mapping or null if key is not a key in this Map

Throws
flash.errors:IllegalOperationError — when removing from this Map is not supported
size()method 
public function size():int

Answers the number of elements in this Map.

Returns
int — the number of elements in this Map
values()method 
public function values():Collection

Returns all of the current Map values in a Collection. As the returned Collection is backed by this Map, users should be aware that changes in one will be immediately visible in the other.

Returns
Collection — a Collection of the values