de.grogra.rgg.model
Class Runtime

java.lang.Object
  extended by de.grogra.xl.impl.base.RuntimeModel
      extended by de.grogra.rgg.model.Runtime
All Implemented Interfaces:
RuntimeModel

public class Runtime
extends RuntimeModel


Field Summary
static Runtime INSTANCE
           
 
Fields inherited from class de.grogra.xl.impl.base.RuntimeModel
BRANCH_EDGE, branchIn, CONTAINMENT_EDGE, CONTAINMENT_END_EDGE, copyIn, copyOut, MARK_EDGE, MIN_NORMAL_BIT_INDEX, MIN_USER_EDGE, REFINEMENT_EDGE, SPECIAL_MASK, SUCCESSOR_EDGE
 
Constructor Summary
Runtime()
           
 
Method Summary
 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.
 
Methods inherited from class de.grogra.xl.impl.base.RuntimeModel
edgeBitsIntersection, edgeBitsUnion, getStandardEdgeFor, initialize, testEdgeBits
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final Runtime INSTANCE
Constructor Detail

Runtime

public Runtime()
Method Detail

addEdgeBits

public void addEdgeBits(java.lang.Object source,
                        java.lang.Object target,
                        int bits)
Description copied from class: RuntimeModel
Adds a set of edge bits from a source node to a target node.

Specified by:
addEdgeBits in class RuntimeModel
Parameters:
source - the source node of the edge
target - the target node of the edge
bits - the edge bits that are to be added

createEdgeIterator

public EdgeIterator createEdgeIterator(java.lang.Object node,
                                       EdgeDirection dir)
Description copied from class: RuntimeModel
Creates an iterator over the edges of node. The iterator is set to the first edge of the node, if any. The direction dir has to be respected by the iterator.

Specified by:
createEdgeIterator in class RuntimeModel
Parameters:
node - the node whose edges are to be iterated
dir - direction in which edges are traversed (seen from node)
Returns:
an edge iterator

currentGraph

public RGGGraph currentGraph()
Description copied from interface: RuntimeModel
Returns the graph that shall be used in the context of the current thread. This is needed by graph-related XL statements which do not explicitly specify the graph to use.

Specified by:
currentGraph in interface RuntimeModel
Overrides:
currentGraph in class RuntimeModel
Returns:
the current graph for this model

getEdgeBits

public int getEdgeBits(java.lang.Object source,
                       java.lang.Object target)
Description copied from class: RuntimeModel
Return the edge bits between a source node and a target node. If there is no edge at all, 0 is returned.

Specified by:
getEdgeBits in class RuntimeModel
Parameters:
source - the source node of the edge
target - the target node of the edge
Returns:
the edge bits

getNodeType

public java.lang.Class getNodeType()
Description copied from class: RuntimeModel
Specifies the base type of nodes of this runtime model. This should return the same type as CompiletimeModel.getNodeType() for the corresponding CompiletimeModel implementation.

Specified by:
getNodeType in class RuntimeModel
Returns:
base type of nodes

isNode

public boolean isNode(java.lang.Object value)
Description copied from interface: RuntimeModel
Determines if value represents a valid node for this run-time model.

Specified by:
isNode in interface RuntimeModel
Overrides:
isNode in class RuntimeModel
Parameters:
value - the value to be tested
Returns:
true iff the value represents a node

isWrapperFor

public boolean isWrapperFor(java.lang.Object wrapper,
                            Type type)
Description copied from interface: RuntimeModel
Tests if the object is a wrapper for values of the given type.

Specified by:
isWrapperFor in interface RuntimeModel
Overrides:
isWrapperFor in class RuntimeModel
Parameters:
wrapper - the potential wrapper to be tested
type - the value type
Returns:
true iff object is a wrapper for values of type type

setCurrentGraph

public void setCurrentGraph(Graph extent)
Overrides:
setCurrentGraph in class RuntimeModel

setCurrentGraph

public void setCurrentGraph(GraphManager graph)

unwrapBoolean

public boolean unwrapBoolean(java.lang.Object wrapper)
Description copied from interface: RuntimeModel
Extracts the boolean value of a wrapper.

Specified by:
unwrapBoolean in interface RuntimeModel
Overrides:
unwrapBoolean in class RuntimeModel
Parameters:
wrapper - the wrapper
Returns:
the wrapped value of the wrapper

unwrapByte

public byte unwrapByte(java.lang.Object wrapper)
Description copied from interface: RuntimeModel
Extracts the byte value of a wrapper.

Specified by:
unwrapByte in interface RuntimeModel
Overrides:
unwrapByte in class RuntimeModel
Parameters:
wrapper - the wrapper
Returns:
the wrapped value of the wrapper

unwrapChar

public char unwrapChar(java.lang.Object wrapper)
Description copied from interface: RuntimeModel
Extracts the char value of a wrapper.

Specified by:
unwrapChar in interface RuntimeModel
Overrides:
unwrapChar in class RuntimeModel
Parameters:
wrapper - the wrapper
Returns:
the wrapped value of the wrapper

unwrapDouble

public double unwrapDouble(java.lang.Object wrapper)
Description copied from interface: RuntimeModel
Extracts the double value of a wrapper.

Specified by:
unwrapDouble in interface RuntimeModel
Overrides:
unwrapDouble in class RuntimeModel
Parameters:
wrapper - the wrapper
Returns:
the wrapped value of the wrapper

unwrapFloat

public float unwrapFloat(java.lang.Object wrapper)
Description copied from interface: RuntimeModel
Extracts the float value of a wrapper.

Specified by:
unwrapFloat in interface RuntimeModel
Overrides:
unwrapFloat in class RuntimeModel
Parameters:
wrapper - the wrapper
Returns:
the wrapped value of the wrapper

unwrapInt

public int unwrapInt(java.lang.Object wrapper)
Description copied from interface: RuntimeModel
Extracts the int value of a wrapper.

Specified by:
unwrapInt in interface RuntimeModel
Overrides:
unwrapInt in class RuntimeModel
Parameters:
wrapper - the wrapper
Returns:
the wrapped value of the wrapper

unwrapLong

public long unwrapLong(java.lang.Object wrapper)
Description copied from interface: RuntimeModel
Extracts the long value of a wrapper.

Specified by:
unwrapLong in interface RuntimeModel
Overrides:
unwrapLong in class RuntimeModel
Parameters:
wrapper - the wrapper
Returns:
the wrapped value of the wrapper

unwrapObject

public java.lang.Object unwrapObject(java.lang.Object wrapper)
Description copied from interface: RuntimeModel
Extracts the Object value of a wrapper.

Specified by:
unwrapObject in interface RuntimeModel
Overrides:
unwrapObject in class RuntimeModel
Parameters:
wrapper - the wrapper
Returns:
the wrapped value of the wrapper

unwrapShort

public short unwrapShort(java.lang.Object wrapper)
Description copied from interface: RuntimeModel
Extracts the short value of a wrapper.

Specified by:
unwrapShort in interface RuntimeModel
Overrides:
unwrapShort in class RuntimeModel
Parameters:
wrapper - the wrapper
Returns:
the wrapped value of the wrapper