de.grogra.rgg.model
public class Runtime extends RuntimeModel
| Modifier and Type | Field and Description |
|---|---|
static Runtime |
INSTANCE |
BRANCH_EDGE, branchIn, CONTAINMENT_EDGE, CONTAINMENT_END_EDGE, copyIn, copyInNoRefine, copyOut, copyOutNoRefine, MARK_EDGE, MIN_NORMAL_BIT_INDEX, MIN_USER_EDGE, REFINEMENT_EDGE, SPECIAL_MASK, SUCCESSOR_EDGE| Constructor and Description |
|---|
Runtime() |
| Modifier and Type | Method and Description |
|---|---|
void |
addEdgeBits(java.lang.Object source,
java.lang.Object target,
int bits)
Adds a set of edge bits from a
source node
to a target node. |
EdgeIterator |
createEdgeIterator(java.lang.Object node,
EdgeDirection dir)
Creates an iterator over the edges of
node. |
RGGGraph |
currentGraph()
Returns the graph that shall be used in the context of the
current thread.
|
int |
getEdgeBits(java.lang.Object source,
java.lang.Object target)
Return the edge bits between a
source node and a
target node. |
java.lang.Class |
getNodeType()
Specifies the base type of nodes of this runtime model.
|
boolean |
isNode(java.lang.Object value)
Determines if
value represents a valid node
for this run-time model. |
boolean |
isWrapperFor(java.lang.Object wrapper,
Type type)
Tests if the object is a wrapper for values of the given type.
|
void |
setCurrentGraph(Graph extent) |
void |
setCurrentGraph(GraphManager graph) |
boolean |
unwrapBoolean(java.lang.Object wrapper)
Extracts the boolean value of a wrapper.
|
byte |
unwrapByte(java.lang.Object wrapper)
Extracts the byte value of a wrapper.
|
char |
unwrapChar(java.lang.Object wrapper)
Extracts the char value of a wrapper.
|
double |
unwrapDouble(java.lang.Object wrapper)
Extracts the double value of a wrapper.
|
float |
unwrapFloat(java.lang.Object wrapper)
Extracts the float value of a wrapper.
|
int |
unwrapInt(java.lang.Object wrapper)
Extracts the int value of a wrapper.
|
long |
unwrapLong(java.lang.Object wrapper)
Extracts the long value of a wrapper.
|
java.lang.Object |
unwrapObject(java.lang.Object wrapper)
Extracts the Object value of a wrapper.
|
short |
unwrapShort(java.lang.Object wrapper)
Extracts the short value of a wrapper.
|
edgeBitsIntersection, edgeBitsRemove, edgeBitsUnion, getStandardEdgeFor, initialize, testEdgeBitspublic static final Runtime INSTANCE
public void addEdgeBits(java.lang.Object source,
java.lang.Object target,
int bits)
RuntimeModelsource node
to a target node.addEdgeBits in class RuntimeModelsource - the source node of the edgetarget - the target node of the edgebits - the edge bits that are to be addedpublic EdgeIterator createEdgeIterator(java.lang.Object node, EdgeDirection dir)
RuntimeModelnode. The iterator
is set to the first edge of the node, if any. The direction dir
has to be respected by the iterator.createEdgeIterator in class RuntimeModelnode - the node whose edges are to be iterateddir - direction in which edges are traversed (seen from node)public RGGGraph currentGraph()
RuntimeModelcurrentGraph in interface RuntimeModelcurrentGraph in class RuntimeModelpublic int getEdgeBits(java.lang.Object source,
java.lang.Object target)
RuntimeModelsource node and a
target node. If there is no edge at all, 0 is returned.getEdgeBits in class RuntimeModelsource - the source node of the edgetarget - the target node of the edgepublic java.lang.Class getNodeType()
RuntimeModelCompiletimeModel.getNodeType()
for the corresponding CompiletimeModel implementation.getNodeType in class RuntimeModelpublic boolean isNode(java.lang.Object value)
RuntimeModelvalue represents a valid node
for this run-time model.isNode in interface RuntimeModelisNode in class RuntimeModelvalue - the value to be testedtrue iff the value represents a nodepublic boolean isWrapperFor(java.lang.Object wrapper,
Type type)
RuntimeModelisWrapperFor in interface RuntimeModelisWrapperFor in class RuntimeModelwrapper - the potential wrapper to be testedtype - the value typetrue iff object is a wrapper for values of type typepublic void setCurrentGraph(Graph extent)
setCurrentGraph in class RuntimeModelpublic void setCurrentGraph(GraphManager graph)
public boolean unwrapBoolean(java.lang.Object wrapper)
RuntimeModelunwrapBoolean in interface RuntimeModelunwrapBoolean in class RuntimeModelwrapper - the wrapperpublic byte unwrapByte(java.lang.Object wrapper)
RuntimeModelunwrapByte in interface RuntimeModelunwrapByte in class RuntimeModelwrapper - the wrapperpublic char unwrapChar(java.lang.Object wrapper)
RuntimeModelunwrapChar in interface RuntimeModelunwrapChar in class RuntimeModelwrapper - the wrapperpublic double unwrapDouble(java.lang.Object wrapper)
RuntimeModelunwrapDouble in interface RuntimeModelunwrapDouble in class RuntimeModelwrapper - the wrapperpublic float unwrapFloat(java.lang.Object wrapper)
RuntimeModelunwrapFloat in interface RuntimeModelunwrapFloat in class RuntimeModelwrapper - the wrapperpublic int unwrapInt(java.lang.Object wrapper)
RuntimeModelunwrapInt in interface RuntimeModelunwrapInt in class RuntimeModelwrapper - the wrapperpublic long unwrapLong(java.lang.Object wrapper)
RuntimeModelunwrapLong in interface RuntimeModelunwrapLong in class RuntimeModelwrapper - the wrapperpublic java.lang.Object unwrapObject(java.lang.Object wrapper)
RuntimeModelunwrapObject in interface RuntimeModelunwrapObject in class RuntimeModelwrapper - the wrapperpublic short unwrapShort(java.lang.Object wrapper)
RuntimeModelunwrapShort in interface RuntimeModelunwrapShort in class RuntimeModelwrapper - the wrapper