Module rgg

Class Runtime

All Implemented Interfaces:
RuntimeModel

public class Runtime extends RuntimeModel
  • Field Details

    • INSTANCE

      public static final Runtime INSTANCE
  • Constructor Details

    • Runtime

      public Runtime()
  • Method Details

    • setCurrentGraph

      public void setCurrentGraph(Graph extent)
      Overrides:
      setCurrentGraph in class RuntimeModel
    • 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
    • setCurrentGraph

      public void setCurrentGraph(GraphManager graph)
    • isNode

      public boolean isNode(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
    • getNodeType

      public 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
    • addEdgeBits

      public void addEdgeBits(Object source, 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
    • getEdgeBits

      public int getEdgeBits(Object source, 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
    • createEdgeIterator

      public EdgeIterator createEdgeIterator(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
    • isWrapperFor

      public boolean isWrapperFor(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
    • unwrapBoolean

      public boolean unwrapBoolean(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(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
    • unwrapShort

      public short unwrapShort(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
    • unwrapChar

      public char unwrapChar(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
    • unwrapInt

      public int unwrapInt(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(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
    • unwrapFloat

      public float unwrapFloat(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
    • unwrapDouble

      public double unwrapDouble(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
    • unwrapObject

      public Object unwrapObject(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