Packagecom.yworks.yfiles.util
Classpublic class Maps
InheritanceMaps Inheritance YObject Inheritance Object

This class provides convenience and transformation services for Node- and EdgeMaps.



Public Methods
 MethodDefined By
  
Maps(init:Boolean = true)
Maps
  
[static] Create a DataMap view of the given map.
Maps
  
[static] Create an EdgeMap view of the given map.
Maps
  
[static] Creates a DataMap that is based on hashing.
Maps
  
[static] Creates an EdgeMap that is based on hashing.
Maps
  
[static] Creates a NodeMap that is based on hashing.
Maps
  
createIndexEdgeMap(data:Vector.<Number>):EdgeMap
[static] Returns a EdgeMap view of a double array defined for edges.
Maps
  
createIndexEdgeMapBool(data:Vector.<Boolean>):EdgeMap
[static] Returns a EdgeMap view of a boolean array defined for edges.
Maps
  
createIndexEdgeMapInt(data:Vector.<int>):EdgeMap
[static] Returns a EdgeMap view of an int array defined for edges.
Maps
  
createIndexEdgeMapMixed(doubleData:Vector.<Number>, intData:Vector.<int>, boolData:Vector.<Boolean>, objectData:Vector.<Object>):EdgeMap
[static] Returns a EdgeMap view of a double, int, boolean and Object array defined for edges.
Maps
  
createIndexEdgeMapObj(data:Vector.<Object>):EdgeMap
[static] Returns a EdgeMap view of an Object array defined for edges.
Maps
  
createIndexNodeMap(data:Vector.<Number>):NodeMap
[static] Returns a NodeMap view of a double array defined for nodes.
Maps
  
createIndexNodeMapBool(data:Vector.<Boolean>):NodeMap
[static] Returns a NodeMap view of a boolean array defined for nodes.
Maps
  
createIndexNodeMapInt(data:Vector.<int>):NodeMap
[static] Returns a NodeMap view of an int array defined for nodes.
Maps
  
createIndexNodeMapMixed(doubleData:Vector.<Number>, intData:Vector.<int>, boolData:Vector.<Boolean>, objectData:Vector.<Object>):NodeMap
[static] Returns a NodeMap view of a double, int, boolean and Object array defined for nodes.
Maps
  
createIndexNodeMapObj(data:Vector.<Object>):NodeMap
[static] Returns a NodeMap view of an Object array defined for nodes.
Maps
  
[static] Create a NodeMap view of the given map.
Maps
 Inherited
equals(o:Object):Boolean
YObject
  
getClass():Class
[override]
Maps
 Inherited
hashCode():int
YObject
  
[static]
Maps
Protected Methods
 MethodDefined By
  
initMaps():void
Maps
Constructor Detail
Maps()Constructor
public function Maps(init:Boolean = true)



Parameters
init:Boolean (default = true)
Method Detail
createDataMap()method
public static function createDataMap(map:Map):DataMap

Create a DataMap view of the given map. Accessing basic value types is solved by storing the corresponding wrapper types Double, Integer and Boolean within the given Map.

Parameters

map:Map

Returns
DataMap
createEdgeMap()method 
public static function createEdgeMap(map:Map):EdgeMap

Create an EdgeMap view of the given map. Accessing basic value types is solved by storing the corresponding wrapper types Double, Integer and Boolean within the given Map.

Parameters

map:Map

Returns
EdgeMap
createHashedDataMap()method 
public static function createHashedDataMap():DataMap

Creates a DataMap that is based on hashing. The preconditions specified in java.util.HashMap apply for the keys and values of this map.

Returns
DataMap
createHashedEdgeMap()method 
public static function createHashedEdgeMap():EdgeMap

Creates an EdgeMap that is based on hashing. The preconditions specified in java.util.HashMap apply for the keys and values of this map.

Returns
EdgeMap
createHashedNodeMap()method 
public static function createHashedNodeMap():NodeMap

Creates a NodeMap that is based on hashing. The preconditions specified in java.util.HashMap apply for the keys and values of this map.

Returns
NodeMap
createIndexEdgeMap()method 
public static function createIndexEdgeMap(data:Vector.<Number>):EdgeMap

Returns a EdgeMap view of a double array defined for edges. The double value data[edge.index()] will be accessed by the EdgeMap upon the method calls getDouble(edge) and setDouble(edge,value).

Warning! The indices of the accessed edges must not change during the use of this EdgeMap.

Parameters

data:Vector.<Number> — array data for each edge of a static graph

Returns
EdgeMap — a EdgeMap view of the given array
createIndexEdgeMapBool()method 
public static function createIndexEdgeMapBool(data:Vector.<Boolean>):EdgeMap

Returns a EdgeMap view of a boolean array defined for edges. The boolean value data[edge.index()] will be accessed by the EdgeMap upon the method calls getBool(edge) and setBool(edge,value).

Warning! The indices of the accessed edges must not change during the use of this EdgeMap.

Parameters

data:Vector.<Boolean> — array data for each edge of a static graph

Returns
EdgeMap — a EdgeMap view of the given array
createIndexEdgeMapInt()method 
public static function createIndexEdgeMapInt(data:Vector.<int>):EdgeMap

Returns a EdgeMap view of an int array defined for edges. The int value data[edge.index()] will be accessed by the EdgeMap upon the method calls getInt(edge) and setInt(edge,value).

Warning! The indices of the accessed edges must not change during the use of this EdgeMap.

Parameters

data:Vector.<int> — array data for each edge of a static graph

Returns
EdgeMap — a EdgeMap view of the given array
createIndexEdgeMapMixed()method 
public static function createIndexEdgeMapMixed(doubleData:Vector.<Number>, intData:Vector.<int>, boolData:Vector.<Boolean>, objectData:Vector.<Object>):EdgeMap

Returns a EdgeMap view of a double, int, boolean and Object array defined for edges.

The double value doubleData[edge.index()] will be accessed by the EdgeMap upon the method calls getDouble(edge) and setDouble(edge,value).

The int value intData[edge.index()] will be accessed by the EdgeMap upon the method calls getInt(edge) and setInt(edge,value).

The boolean value boolData[edge.index()] will be accessed by the EdgeMap upon the method calls getBool(edge) and setBool(edge,value).

The Object value objectData[edge.index()] will be accessed by the EdgeMap upon the method calls get(edge) and set(edge,value).

Warning! The indices of the accessed edges must not change during the use of this EdgeMap.

Parameters

doubleData:Vector.<Number> — double data for each edge of a static graph
 
intData:Vector.<int> — int data for each edge of a static graph
 
boolData:Vector.<Boolean> — boolean data for each edge of a static graph
 
objectData:Vector.<Object> — Object data for each edge of a static graph

Returns
EdgeMap — a EdgeMap view of the given arrays
createIndexEdgeMapObj()method 
public static function createIndexEdgeMapObj(data:Vector.<Object>):EdgeMap

Returns a EdgeMap view of an Object array defined for edges. The Object value data[edge.index()] will be accessed by the EdgeMap upon the method calls get(edge) and set(edge,value).

Warning! The indices of the accessed edges must not change during the use of this EdgeMap.

Parameters

data:Vector.<Object> — array data for each edge of a static graph

Returns
EdgeMap — a EdgeMap view of the given array
createIndexNodeMap()method 
public static function createIndexNodeMap(data:Vector.<Number>):NodeMap

Returns a NodeMap view of a double array defined for nodes. The double value data[node.index()] will be accessed by the NodeMap upon the method calls getDouble(node) and setDouble(node,value).

Warning! The indices of the accessed nodes must not change during the use of this NodeMap.

Parameters

data:Vector.<Number> — array data for each node of a static graph

Returns
NodeMap — a NodeMap view of the given array
createIndexNodeMapBool()method 
public static function createIndexNodeMapBool(data:Vector.<Boolean>):NodeMap

Returns a NodeMap view of a boolean array defined for nodes. The boolean value data[node.index()] will be accessed by the NodeMap upon the method calls getBool(node) and setBool(node,value).

Parameters

data:Vector.<Boolean> — array data for each node of a static graph

Returns
NodeMap — a NodeMap view of the given array
createIndexNodeMapInt()method 
public static function createIndexNodeMapInt(data:Vector.<int>):NodeMap

Returns a NodeMap view of an int array defined for nodes. The int value data[node.index()] will be accessed by the NodeMap upon the method calls getInt(node) and setInt(node,value). Warning! The indices of the accessed nodes must not change during the use of this NodeMap.

Parameters

data:Vector.<int> — array data for each node of a static graph

Returns
NodeMap — a NodeMap view of the given array
createIndexNodeMapMixed()method 
public static function createIndexNodeMapMixed(doubleData:Vector.<Number>, intData:Vector.<int>, boolData:Vector.<Boolean>, objectData:Vector.<Object>):NodeMap

Returns a NodeMap view of a double, int, boolean and Object array defined for nodes.

The double value doubleData[node.index()] will be accessed by the NodeMap upon the method calls getDouble(node) and setDouble(node,value).

The int value intData[node.index()] will be accessed by the NodeMap upon the method calls getInt(node) and setInt(node,value).

The boolean value boolData[node.index()] will be accessed by the NodeMap upon the method calls getBool(node) and setBool(node,value).

The Object value objectData[node.index()] will be accessed by the NodeMap upon the method calls get(node) and set(node,value).

Warning! The indices of the accessed nodes must not change during the use of this NodeMap.

Parameters

doubleData:Vector.<Number> — double data for each node of a static graph
 
intData:Vector.<int> — int data for each node of a static graph
 
boolData:Vector.<Boolean> — boolean data for each node of a static graph
 
objectData:Vector.<Object> — Object data for each node of a static graph

Returns
NodeMap — a NodeMap view of the given arrays
createIndexNodeMapObj()method 
public static function createIndexNodeMapObj(data:Vector.<Object>):NodeMap

Returns a NodeMap view of an Object array defined for nodes. The Object value data[node.index()] will be accessed by the NodeMap upon the method calls get(node) and set(node,value). Warning! The indices of the accessed nodes must not change during the use of this NodeMap.

Parameters

data:Vector.<Object> — array data for each node of a static graph

Returns
NodeMap — a NodeMap view of the given array
createNodeMap()method 
public static function createNodeMap(map:Map):NodeMap

Create a NodeMap view of the given map. Accessing basic value types is solved by storing the corresponding wrapper types Double, Integer and Boolean within the given Map.

Parameters

map:Map

Returns
NodeMap
getClass()method 
override public function getClass():Class

Returns
Class
initMaps()method 
protected final function initMaps():void

newMaps()method 
public static function newMaps():Maps

Returns
Maps