public final class Maps extends Object
Modifier and Type | Method and Description |
---|---|
static IDataMap |
createDataMap(Map<Object,Object> map)
Create a DataMap view of the given map.
|
static IEdgeMap |
createEdgeMap(Map<Object,Object> map)
Create an EdgeMap view of the given map.
|
static IDataMap |
createHashedDataMap()
Creates a DataMap that is based on hashing.
|
static IEdgeMap |
createHashedEdgeMap()
Creates an EdgeMap that is based on hashing.
|
static INodeMap |
createHashedNodeMap()
Creates a NodeMap that is based on hashing.
|
static <K,V> Map<K,V> |
createHashMap()
Factory method that creates a
Map that is a special hash map implementation mainly used by the layout
algorithms. |
static <K,V> Map<K,V> |
createHashMap(Collection<Map.Entry<K,V>> entries)
Factory method that creates a
Map that is a special hash map implementation mainly used by the layout
algorithms. |
static <T> Collection<T> |
createHashSet()
Factory method that creates an
Collection implementation with set semantics that is a special hash map based
implementation mainly used by the layout algorithms. |
static <T> Collection<T> |
createHashSet(Iterable<T> items)
Factory method that creates an
Collection implementation with set semantics that is a special hash map based
implementation mainly used by the layout algorithms. |
static IEdgeMap |
createIndexEdgeMap(boolean[] data)
Returns a EdgeMap view of a boolean array defined for edges.
|
static IEdgeMap |
createIndexEdgeMap(double[] data)
Returns a EdgeMap view of a double array defined for edges.
|
static IEdgeMap |
createIndexEdgeMap(double[] doubleData,
int[] intData,
boolean[] boolData,
Object[] objectData)
Returns a EdgeMap view of a double, int, boolean and Object array defined for edges.
|
static IEdgeMap |
createIndexEdgeMap(int[] data)
Returns a EdgeMap view of an int array defined for edges.
|
static IEdgeMap |
createIndexEdgeMap(Object[] data)
Returns a EdgeMap view of an Object array defined for edges.
|
static INodeMap |
createIndexNodeMap(boolean[] data)
Returns a NodeMap view of a boolean array defined for nodes.
|
static INodeMap |
createIndexNodeMap(double[] data)
Returns a NodeMap view of a double array defined for nodes.
|
static INodeMap |
createIndexNodeMap(double[] doubleData,
int[] intData,
boolean[] boolData,
Object[] objectData)
Returns a NodeMap view of a double, int, boolean and Object array defined for nodes.
|
static INodeMap |
createIndexNodeMap(int[] data)
Returns a NodeMap view of an int array defined for nodes.
|
static INodeMap |
createIndexNodeMap(Object[] data)
Returns a NodeMap view of an Object array defined for nodes.
|
static INodeMap |
createNodeMap(Map<Object,Object> map)
Create a NodeMap view of the given map.
|
public static final IDataMap createDataMap(Map<Object,Object> map)
Accessing basic value types is solved by storing the corresponding wrapper types Double, Integer and Boolean within the given Map.
public static final IEdgeMap createEdgeMap(Map<Object,Object> map)
Accessing basic value types is solved by storing the corresponding wrapper types Double, Integer and Boolean within the given Map.
public static final IDataMap createHashedDataMap()
The preconditions specified in java.util.HashMap apply for the keys and values of this map.
public static final IEdgeMap createHashedEdgeMap()
The preconditions specified in java.util.HashMap apply for the keys and values of this map.
public static final INodeMap createHashedNodeMap()
The preconditions specified in java.util.HashMap apply for the keys and values of this map.
public static final <K,V> Map<K,V> createHashMap()
Map
that is a special hash map implementation mainly used by the layout
algorithms.public static final <K,V> Map<K,V> createHashMap(Collection<Map.Entry<K,V>> entries)
Map
that is a special hash map implementation mainly used by the layout
algorithms.entries
- The items to optionally populate the set with initially.public static final <T> Collection<T> createHashSet()
Collection
implementation with set semantics that is a special hash map based
implementation mainly used by the layout algorithms.public static final <T> Collection<T> createHashSet(Iterable<T> items)
Collection
implementation with set semantics that is a special hash map based
implementation mainly used by the layout algorithms.items
- The items to optionally populate the set with initially.public static final IEdgeMap createIndexEdgeMap(boolean[] data)
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.
data
- array data for each edge of a static graphpublic static final IEdgeMap createIndexEdgeMap(double[] data)
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.
data
- array data for each edge of a static graphpublic static final IEdgeMap createIndexEdgeMap(double[] doubleData, int[] intData, boolean[] boolData, Object[] objectData)
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.
doubleData
- double data for each edge of a static graphintData
- int data for each edge of a static graphboolData
- boolean data for each edge of a static graphobjectData
- Object data for each edge of a static graphpublic static final IEdgeMap createIndexEdgeMap(int[] data)
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.
data
- array data for each edge of a static graphpublic static final IEdgeMap createIndexEdgeMap(Object[] data)
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.
data
- array data for each edge of a static graphpublic static final INodeMap createIndexNodeMap(boolean[] data)
The boolean value data[node.index()]
will be accessed by the NodeMap upon the method calls getBool(node)
and setBool(node,value)
.
data
- array data for each node of a static graphpublic static final INodeMap createIndexNodeMap(double[] data)
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.
data
- array data for each node of a static graphpublic static final INodeMap createIndexNodeMap(double[] doubleData, int[] intData, boolean[] boolData, Object[] objectData)
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.
doubleData
- double data for each node of a static graphintData
- int data for each node of a static graphboolData
- boolean data for each node of a static graphobjectData
- Object data for each node of a static graphpublic static final INodeMap createIndexNodeMap(int[] data)
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.
data
- array data for each node of a static graphpublic static final INodeMap createIndexNodeMap(Object[] data)
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.
data
- array data for each node of a static graph