y.io
Class LinkMap

java.lang.Object
  |
  +--y.io.LinkMap

public class LinkMap
extends Object

A simple named map for key-value-pairs. Values must be of type LinkInfo. Keys may be of any type, with nodes, edges, and labels being the main focus.


Constructor Summary
LinkMap()
          Constructs an empty, unnamed LinkMap.
 
Method Summary
 void clear()
          Removes all mappings from this map and deletes its name.
 LinkInfo get(Object key)
          Gets the LinkInfo mapped to the specified key.
 String getMapName()
          Returns this map's name.
 void put(Object key, LinkInfo value)
          Maps the specified value to the specified key.
 void remove(Object key)
          Removes the specified key and its associated value from this map.
 void setMapName(String mapName)
          Specifies this map's name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LinkMap

public LinkMap()
Constructs an empty, unnamed LinkMap.

Method Detail

getMapName

public String getMapName()
Returns this map's name.

Returns:
this map's name.

setMapName

public void setMapName(String mapName)
Specifies this map's name.

Parameters:
mapName -

get

public LinkInfo get(Object key)
Gets the LinkInfo mapped to the specified key.

Parameters:
key -
Returns:
the LinkInfo associated to the key; or null if no value has been mapped to the key

put

public void put(Object key,
                LinkInfo value)
Maps the specified value to the specified key.

Parameters:
key -
value -

remove

public void remove(Object key)
Removes the specified key and its associated value from this map.


clear

public void clear()
Removes all mappings from this map and deletes its name.


© Copyright 2000-2003,
yWorks GmbH.
All rights reserved.

2003