TKey
- The type of the keys.TValue
- The type of the values.public class DataProviderAdapter<TKey,TValue> extends Object implements IDataProvider
IMapper
into an IDataProvider
.
This class is used by LayoutExecutor
, LayoutGraphAdapter
, and YGraphAdapter
to convert an IGraph
into a corresponding
Graph
. Unless that conversion needs to be customized, or aforementioned classes
cannot be used, this class usually doesn't need to be used explicitly.
Constructor and Description |
---|
DataProviderAdapter(Class<TKey> kType,
IMapper<TKey,TValue> mapper)
Creates a new instance that adapts the provided mapper instance.
|
Modifier and Type | Method and Description |
---|---|
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.
|
public final Object get(Object dataHolder)
IDataProvider
This method may throw an UnsupportedOperationException.
get
in interface IDataProvider
public final boolean getBool(Object dataHolder)
IDataProvider
This method may throw an UnsupportedOperationException.
getBool
in interface IDataProvider
public final double getDouble(Object dataHolder)
IDataProvider
This method may throw an UnsupportedOperationException.
getDouble
in interface IDataProvider
public final int getInt(Object dataHolder)
IDataProvider
This method may throw an UnsupportedOperationException.
getInt
in interface IDataProvider