y.util
Class NodeMapAdapter

java.lang.Object
  |
  +--y.util.NodeMapAdapter
All Implemented Interfaces:
DataAcceptor, DataProvider, NodeMap

public abstract class NodeMapAdapter
extends Object
implements NodeMap

This class is an abstract empty implementation of the NodeMap interface. Subclasses


Constructor Summary
NodeMapAdapter()
           
 
Method Summary
 Object get(Object key)
          Returns the value bound to the given node.
 boolean getBool(Object key)
          Returns the boolean value bound to the given node.
 double getDouble(Object key)
          Returns the double value bound to the given node.
 int getInt(Object key)
          Returns the integer value bound to the given node.
 void set(Object key, Object value)
          Associates the given value to with the given node.
 void setBool(Object key, boolean value)
          Associates the given boolean value to with the given node.
 void setDouble(Object key, double value)
          Associates the given double value to with the given node.
 void setInt(Object key, int value)
          Associates the given integer value to with the given node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NodeMapAdapter

public NodeMapAdapter()
Method Detail

set

public void set(Object key,
                Object value)
Associates the given value to with the given node.

Specified by:
set in interface NodeMap

get

public Object get(Object key)
Returns the value bound to the given node.

Specified by:
get in interface NodeMap
Parameters:
key -
Returns:
null

setBool

public void setBool(Object key,
                    boolean value)
Associates the given boolean value to with the given node.

Specified by:
setBool in interface NodeMap

getBool

public boolean getBool(Object key)
Returns the boolean value bound to the given node.

Precondition: The value must have been associated to the given node by a call to setBool.

Specified by:
getBool in interface NodeMap
Parameters:
key -
Returns:
false

setDouble

public void setDouble(Object key,
                      double value)
Associates the given double value to with the given node.

Specified by:
setDouble in interface NodeMap

getDouble

public double getDouble(Object key)
Returns the double value bound to the given node.

Precondition: The value must have been associated to the given node by a call to setDouble.

Specified by:
getDouble in interface NodeMap
Returns:
0.0d

setInt

public void setInt(Object key,
                   int value)
Associates the given integer value to with the given node.

Specified by:
setInt in interface NodeMap

getInt

public int getInt(Object key)
Returns the integer value bound to the given node.

Precondition: The value must have been associated to the given node by a call to setInt.

Specified by:
getInt in interface NodeMap
Returns:
0

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

2003