Search this API

y.layout.hierarchic.incremental
Class IntValueHolderAdapter

java.lang.Object
  extended by y.layout.hierarchic.incremental.IntValueHolderAdapter
All Implemented Interfaces:
DataProvider

public class IntValueHolderAdapter
extends java.lang.Object
implements DataProvider

This class is an adapter that uses a DataMap, NodeMap or EdgeMap implementation and wraps it as a DataProvider that provides IntValueHolder instances for each element.

See HierarchicLayouter.LAYER_VALUE_HOLDER_DPKEY for a typical use case of this class.

 
Your browser does not support SVG content.

Constructor Summary
IntValueHolderAdapter(DataAcceptor acc, DataProvider dp)
          Creates a new instance of IntValueHolderAdapter using a pair of DataAcceptor and DataProvider instances for storage and retrieval.
IntValueHolderAdapter(DataMap map)
          Creates a new instance of IntValueHolderAdapter using a DataMap.
IntValueHolderAdapter(EdgeMap map)
          Creates a new instance of IntValueHolderAdapter using an EdgeMap.
IntValueHolderAdapter(NodeMap map)
          Creates a new instance of IntValueHolderAdapter using a NodeMap.
 
Method Summary
 java.lang.Object get(java.lang.Object dataHolder)
          Returns an Object value associated with the given data holder.
 boolean getBool(java.lang.Object dataHolder)
          Returns a boolean value associated with the given data holder.
 double getDouble(java.lang.Object dataHolder)
          Returns a double value associated with the given data holder.
 int getInt(java.lang.Object dataHolder)
          Returns an integer value associated with the given data holder.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IntValueHolderAdapter

public IntValueHolderAdapter(DataMap map)
Creates a new instance of IntValueHolderAdapter using a DataMap.

Parameters:
map - the DataMap that stores integer values for each node and/or edge.

IntValueHolderAdapter

public IntValueHolderAdapter(NodeMap map)
Creates a new instance of IntValueHolderAdapter using a NodeMap.

Parameters:
map - the NodeMap that stores an integer value for each node.

IntValueHolderAdapter

public IntValueHolderAdapter(EdgeMap map)
Creates a new instance of IntValueHolderAdapter using an EdgeMap.

Parameters:
map - the EdgeMap that stores an integer value for each edge.

IntValueHolderAdapter

public IntValueHolderAdapter(DataAcceptor acc,
                             DataProvider dp)
Creates a new instance of IntValueHolderAdapter using a pair of DataAcceptor and DataProvider instances for storage and retrieval.

Parameters:
acc - the DataAcceptor that holds an Object for each node and/or edge
dp - the DataProvider that returns an Object for each node and/or edge
Method Detail

get

public java.lang.Object get(java.lang.Object dataHolder)
Returns an Object value associated with the given data holder.

Specified by:
get in interface DataProvider
Parameters:
dataHolder - the given Object
Returns:
an Object instance

getBool

public boolean getBool(java.lang.Object dataHolder)
Returns a boolean value associated with the given data holder.

Specified by:
getBool in interface DataProvider
Parameters:
dataHolder - the given Object
Returns:
a boolean value

getDouble

public double getDouble(java.lang.Object dataHolder)
Returns a double value associated with the given data holder.

Specified by:
getDouble in interface DataProvider
Parameters:
dataHolder - the given Object
Returns:
a double value

getInt

public int getInt(java.lang.Object dataHolder)
Returns an integer value associated with the given data holder.

Specified by:
getInt in interface DataProvider
Parameters:
dataHolder - the given Object
Returns:
an integer value

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