Search this API

y.base
Interface NodeMap

All Superinterfaces:
DataAcceptor, DataMap, DataProvider
All Known Implementing Classes:
Maps.HighPerformanceBoolMap, Maps.HighPerformanceDoubleMap, Maps.HighPerformanceIntMap, Maps.HighPerformanceObjectMap, NodeMapAdapter

public interface NodeMap
extends DataProvider, DataAcceptor, DataMap

Provides access to data associated with a node. A node map can be considered as a map that allows only nodes as keys. Node keys of a node map must belong to the same graph.

There are data access methods defined for the most common typed values as well.

The node values are initialized with Java(TM) default values (null, 0, 0.0, false) upon initialization.

 

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

Method Detail

set

void set(java.lang.Object node,
         java.lang.Object value)
Associates the given value to the given node.

Specified by:
set in interface DataAcceptor

get

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

Specified by:
get in interface DataProvider

setBool

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

Specified by:
setBool in interface DataAcceptor

getBool

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

Specified by:
getBool in interface DataProvider
Precondition:
The value must have been associated to the given node by a call to setBool.

setDouble

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

Specified by:
setDouble in interface DataAcceptor

getDouble

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

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

setInt

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

Specified by:
setInt in interface DataAcceptor

getInt

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

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

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