de.grogra.xl.impl.base
public abstract class RuntimeModel extends java.lang.Object implements RuntimeModel
| Modifier and Type | Field and Description |
|---|---|
static int |
BRANCH_EDGE
The edge bit mask that encodes a branch edge.
|
protected Neighbors |
branchIn |
static int |
CONTAINMENT_EDGE
The edge bit mask that encodes a containment edge.
|
static int |
CONTAINMENT_END_EDGE
The edge bit mask that encodes an end-of-containment edge.
|
protected Neighbors |
copyIn |
protected Neighbors |
copyInNoRefine |
protected Neighbors |
copyOut |
protected Neighbors |
copyOutNoRefine |
static int |
MARK_EDGE
The edge bit mask that encodes some general-purpose mark edge.
|
static int |
MIN_NORMAL_BIT_INDEX |
static int |
MIN_USER_EDGE
The first unused edge bit mask.
|
static int |
REFINEMENT_EDGE
The edge bit mask that encodes a refinement edge.
|
static int |
SPECIAL_MASK
The edge bit mask that covers the special edge.
|
static int |
SUCCESSOR_EDGE
The edge bit mask that encodes a successor edge.
|
| Constructor and Description |
|---|
RuntimeModel() |
| Modifier and Type | Method and Description |
|---|---|
abstract 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. |
abstract EdgeIterator |
createEdgeIterator(java.lang.Object node,
EdgeDirection dir)
Creates an iterator over the edges of
node. |
Graph |
currentGraph()
Returns the graph that shall be used in the context of the
current thread.
|
static int |
edgeBitsIntersection(int edgeBits,
int mask) |
static int |
edgeBitsRemove(int a,
int toBeRemoved) |
static int |
edgeBitsUnion(int a,
int b) |
abstract int |
getEdgeBits(java.lang.Object source,
java.lang.Object target)
Return the edge bits between a
source node and a
target node. |
abstract java.lang.Class |
getNodeType()
Specifies the base type of nodes of this runtime model.
|
int |
getStandardEdgeFor(int edgeType) |
void |
initialize(java.lang.String params)
Initializes this model.
|
boolean |
isNode(java.lang.Object value)
Determines if
value represents a valid node
for this run-time model. |
boolean |
isWrapperFor(java.lang.Object object,
Type type)
Tests if the object is a wrapper for values of the given type.
|
void |
setCurrentGraph(Graph extent) |
static boolean |
testEdgeBits(int edgeBits,
int mask) |
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.
|
public static final int BRANCH_EDGE
This bit mask represents bit 9, i.e., its value is 512.
protected Neighbors branchIn
public static final int CONTAINMENT_EDGE
This bit mask represents bit 10, i.e., its value is 1024.
public static final int CONTAINMENT_END_EDGE
This bit mask represents bit 11.
protected Neighbors copyIn
protected Neighbors copyInNoRefine
protected Neighbors copyOut
protected Neighbors copyOutNoRefine
public static final int MARK_EDGE
This bit mask represents bit 13.
public static final int MIN_NORMAL_BIT_INDEX
public static final int MIN_USER_EDGE
This bit mask represents bit 14.
public static final int REFINEMENT_EDGE
This bit mask represents bit 12.
public static final int SPECIAL_MASK
This bit mask represents the bits 0 - 7, i.e., its value is 255.
public static final int SUCCESSOR_EDGE
This bit mask represents bit 8, i.e., its value is 256.
public abstract void addEdgeBits(java.lang.Object source,
java.lang.Object target,
int bits)
source node
to a target node.source - the source node of the edgetarget - the target node of the edgebits - the edge bits that are to be addedpublic abstract EdgeIterator createEdgeIterator(java.lang.Object node, EdgeDirection dir)
node. The iterator
is set to the first edge of the node, if any. The direction dir
has to be respected by the iterator.node - the node whose edges are to be iterateddir - direction in which edges are traversed (seen from node)public Graph currentGraph()
RuntimeModelcurrentGraph in interface RuntimeModelpublic static final int edgeBitsIntersection(int edgeBits,
int mask)
public static final int edgeBitsRemove(int a,
int toBeRemoved)
public static final int edgeBitsUnion(int a,
int b)
public abstract int getEdgeBits(java.lang.Object source,
java.lang.Object target)
source node and a
target node. If there is no edge at all, 0 is returned.source - the source node of the edgetarget - the target node of the edgepublic abstract java.lang.Class getNodeType()
CompiletimeModel.getNodeType()
for the corresponding CompiletimeModel implementation.public int getStandardEdgeFor(int edgeType)
public void initialize(java.lang.String params)
RuntimeModelRuntimeModelFactory.modelForName(java.lang.String, java.lang.ClassLoader) after a new RuntimeModel
instance has been created. The format of params
depends on implementations of RuntimeModel.initialize in interface RuntimeModelparams - initialization parameters, possibly nullpublic boolean isNode(java.lang.Object value)
RuntimeModelvalue represents a valid node
for this run-time model.isNode in interface RuntimeModelvalue - the value to be testedtrue iff the value represents a nodepublic boolean isWrapperFor(java.lang.Object object,
Type type)
RuntimeModelisWrapperFor in interface RuntimeModelobject - the potential wrapper to be testedtype - the value typetrue iff object is a wrapper for values of type typepublic void setCurrentGraph(Graph extent)
public static final boolean testEdgeBits(int edgeBits,
int mask)
public boolean unwrapBoolean(java.lang.Object wrapper)
RuntimeModelunwrapBoolean in interface RuntimeModelwrapper - the wrapperpublic byte unwrapByte(java.lang.Object wrapper)
RuntimeModelunwrapByte in interface RuntimeModelwrapper - the wrapperpublic char unwrapChar(java.lang.Object wrapper)
RuntimeModelunwrapChar in interface RuntimeModelwrapper - the wrapperpublic double unwrapDouble(java.lang.Object wrapper)
RuntimeModelunwrapDouble in interface RuntimeModelwrapper - the wrapperpublic float unwrapFloat(java.lang.Object wrapper)
RuntimeModelunwrapFloat in interface RuntimeModelwrapper - the wrapperpublic int unwrapInt(java.lang.Object wrapper)
RuntimeModelunwrapInt in interface RuntimeModelwrapper - the wrapperpublic long unwrapLong(java.lang.Object wrapper)
RuntimeModelunwrapLong in interface RuntimeModelwrapper - the wrapperpublic java.lang.Object unwrapObject(java.lang.Object wrapper)
RuntimeModelunwrapObject in interface RuntimeModelwrapper - the wrapperpublic short unwrapShort(java.lang.Object wrapper)
RuntimeModelunwrapShort in interface RuntimeModelwrapper - the wrapper