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 Object
implements DataProvider

Adapter class 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.


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
 Object get(Object dataHolder)
          Returns an object value associated with the given data holder.
 boolean getBool(Object dataHolder)
          Returns a boolean value associated with the given data holder.
 double getDouble(Object dataHolder)
          Returns a double value associated with the given data holder.
 int getInt(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


IntValueHolderAdapter

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


IntValueHolderAdapter

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


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.

Method Detail

get

public Object get(Object dataHolder)
Description copied from interface: DataProvider
Returns an object value associated with the given data holder. This method may throw an UnsupportedOperationException.

Specified by:
get in interface DataProvider

getBool

public boolean getBool(Object dataHolder)
Description copied from interface: DataProvider
Returns a boolean value associated with the given data holder. This method may throw an UnsupportedOperationException.

Specified by:
getBool in interface DataProvider

getDouble

public double getDouble(Object dataHolder)
Description copied from interface: DataProvider
Returns a double value associated with the given data holder. This method may throw an UnsupportedOperationException.

Specified by:
getDouble in interface DataProvider

getInt

public int getInt(Object dataHolder)
Description copied from interface: DataProvider
Returns an integer value associated with the given data holder. This method may throw an UnsupportedOperationException.

Specified by:
getInt in interface DataProvider

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