Search this API

y.util
Class NodeMapAdapter

java.lang.Object
  extended by y.util.NodeMapAdapter
All Implemented Interfaces:
DataAcceptor, DataMap, DataProvider, NodeMap

public abstract class NodeMapAdapter
extends java.lang.Object
implements NodeMap

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

 

Constructor Summary
NodeMapAdapter()
           
 
Method Summary
 java.lang.Object get(java.lang.Object key)
          Returns the value bound to the given node.
 boolean getBool(java.lang.Object key)
          Returns the boolean value bound to the given node.
 double getDouble(java.lang.Object key)
          Returns the double value bound to the given node.
 int getInt(java.lang.Object key)
          Returns the integer value bound to the given node.
 void set(java.lang.Object key, java.lang.Object value)
          Associates the given value to with the given node.
 void setBool(java.lang.Object key, boolean value)
          Associates the given boolean value to with the given node.
 void setDouble(java.lang.Object key, double value)
          Associates the given double value to with the given node.
 void setInt(java.lang.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(java.lang.Object key,
                java.lang.Object value)
Associates the given value to with the given node.

Specified by:
set in interface DataAcceptor
Specified by:
set in interface NodeMap

get

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

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

setBool

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

Specified by:
setBool in interface DataAcceptor
Specified by:
setBool in interface NodeMap

getBool

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

Specified by:
getBool in interface DataProvider
Specified by:
getBool in interface NodeMap
Precondition:
The value must have been associated to the given node by a call to setBool.
Parameters:
key -
Returns:
false

setDouble

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

Specified by:
setDouble in interface DataAcceptor
Specified by:
setDouble in interface NodeMap

getDouble

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

Specified by:
getDouble in interface DataProvider
Specified by:
getDouble in interface NodeMap
Precondition:
The value must have been associated to the given node by a call to setDouble.
Returns:
0.0d

setInt

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

Specified by:
setInt in interface DataAcceptor
Specified by:
setInt in interface NodeMap

getInt

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

Specified by:
getInt in interface DataProvider
Specified by:
getInt in interface NodeMap
Precondition:
The value must have been associated to the given node by a call to setInt.
Returns:
0

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