|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.util.DataProviders
public class DataProviders
This class provides convenience and transformation services for DataProvider
s.
Nested Class Summary | |
---|---|
static class |
DataProviders.DataProviderOverlayManager
This helper class can be used to overlay DataProvider s registered at a graph
with another DataProvider . |
Constructor Summary | |
---|---|
DataProviders()
|
Method Summary | |
---|---|
static DataProvider |
createConstantDataProvider(java.lang.Object data)
Returns a DataProvider that returns the given value for each
key. |
static DataProvider |
createEdgeDataProvider(boolean[] data)
Returns a DataProvider view of a boolean array defined for edges. |
static DataProvider |
createEdgeDataProvider(double[] data)
Returns a DataProvider view of a double array defined for edges. |
static DataProvider |
createEdgeDataProvider(double[] doubleData,
int[] intData,
boolean[] boolData,
java.lang.Object[] objectData)
Returns a DataProvider view of a double, int, boolean and Object
array defined for edges. |
static DataProvider |
createEdgeDataProvider(int[] data)
Returns a DataProvider view of an int array defined for edges. |
static DataProvider |
createEdgeDataProvider(java.lang.Object[] data)
Returns a DataProvider view of an Object array defined for edges. |
static DataProvider |
createNegatedDataProvider(DataProvider data)
Returns a DataProvider that returns the negated boolean values
provided by another data provider. |
static DataProvider |
createNodeDataProvider(boolean[] data)
Returns a DataProvider view of a boolean array defined for nodes. |
static DataProvider |
createNodeDataProvider(double[] data)
Returns a DataProvider view of a double array defined for nodes. |
static DataProvider |
createNodeDataProvider(double[] doubleData,
int[] intData,
boolean[] boolData,
java.lang.Object[] objectData)
Returns a DataProvider view of a double, int, boolean and Object
array defined for nodes. |
static DataProvider |
createNodeDataProvider(int[] data)
Returns a DataProvider view of an int array defined for nodes. |
static DataProvider |
createNodeDataProvider(java.lang.Object[] data)
Returns a DataProvider view of an Object array defined for nodes. |
static DataProvider |
createSourceDataProvider(DataProvider nodeData)
Returns a DataProvider for edges that return the data provider values
bound to their source nodes. |
static DataProvider |
createTargetDataProvider(DataProvider nodeData)
Returns a DataProvider for edges that return the data provider values
bound to their target nodes. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DataProviders()
Method Detail |
---|
public static DataProvider createEdgeDataProvider(double[] data)
DataProvider
view of a double array defined for edges.
The double value data[edge.index()]
will be returned
by the data provider upon the method call getDouble(edge)
.
data
- array data for each edge of a static graph
public static DataProvider createEdgeDataProvider(int[] data)
DataProvider
view of an int array defined for edges.
The int value data[edge.index()]
will be returned
by the data provider upon the method call getInt(edge)
.
data
- array data for each edge of a static graph
public static DataProvider createEdgeDataProvider(boolean[] data)
DataProvider
view of a boolean array defined for edges.
The boolean value data[edge.index()]
will be returned
by the data provider upon the method call getBool(edge)
.
data
- array data for each edge of a static graph
public static DataProvider createEdgeDataProvider(java.lang.Object[] data)
DataProvider
view of an Object
array defined for edges.
The Object
value data[edge.index()]
will be returned
by the data provider upon the method call get(edge)
.
data
- array data for each edge of a static graph
public static DataProvider createEdgeDataProvider(double[] doubleData, int[] intData, boolean[] boolData, java.lang.Object[] objectData)
DataProvider
view of a double, int, boolean and Object
array defined for edges.
The double value doubleData[edge.index()]
will be returned
by the data provider upon the method call getDouble(edge)
.
The int value intData[edge.index()]
will be returned
by the data provider upon the method call getInt(edge)
.
The boolean value boolData[edge.index()]
will be returned
by the data provider upon the method call getBool(edge)
.
The Object
value objectData[edge.index()]
will be returned
by the data provider upon the method call get(edge)
.
doubleData
- double data for each edge of a static graphintData
- int data for each edge of a static graphboolData
- boolean data for each edge of a static graphobjectData
- Object
data for each edge of a static graph
public static DataProvider createNodeDataProvider(double[] data)
DataProvider
view of a double array defined for nodes.
The double value data[node.index()]
will be returned
by the data provider upon the method call getDouble(node)
.
data
- array data for each node of a static graph
public static DataProvider createNodeDataProvider(int[] data)
DataProvider
view of an int array defined for nodes.
The int value data[node.index()]
will be returned
by the data provider upon the method call getInt(node)
.
data
- array data for each node of a static graph
public static DataProvider createNodeDataProvider(boolean[] data)
DataProvider
view of a boolean array defined for nodes.
The boolean value data[node.index()]
will be returned
by the data provider upon the method call getBool(node)
.
data
- array data for each node of a static graph
public static DataProvider createNodeDataProvider(java.lang.Object[] data)
DataProvider
view of an Object
array defined for nodes.
The Object
value data[node.index()]
will be returned
by the data provider upon the method call get(node)
.
data
- array data for each node of a static graph
public static DataProvider createNodeDataProvider(double[] doubleData, int[] intData, boolean[] boolData, java.lang.Object[] objectData)
DataProvider
view of a double, int, boolean and Object
array defined for nodes.
The double value doubleData[node.index()]
will be returned
by the data provider upon the method call getDouble(node)
.
The int value intData[node.index()]
will be returned
by the data provider upon the method call getInt(node)
.
The boolean value boolData[node.index()]
will be returned
by the data provider upon the method call getBool(node)
.
The Object
value objectData[node.index()]
will be returned
by the data provider upon the method call get(node)
.
doubleData
- double data for each node of a static graphintData
- int data for each node of a static graphboolData
- boolean data for each node of a static graphobjectData
- Object
data for each node of a static graph
public static DataProvider createConstantDataProvider(java.lang.Object data)
DataProvider
that returns the given value for each
key.
data
- constant Object data returned by the created data provider.
public static DataProvider createSourceDataProvider(DataProvider nodeData)
DataProvider
for edges that return the data provider values
bound to their source nodes.
public static DataProvider createTargetDataProvider(DataProvider nodeData)
DataProvider
for edges that return the data provider values
bound to their target nodes.
public static DataProvider createNegatedDataProvider(DataProvider data)
DataProvider
that returns the negated boolean values
provided by another data provider.
|
© Copyright 2000-2022, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |