Module xl.impl

Class RuntimeModel

java.lang.Object
de.grogra.xl.impl.base.RuntimeModel
de.grogra.xl.impl.dom.RuntimeModel
All Implemented Interfaces:
RuntimeModel

public class RuntimeModel extends RuntimeModel
  • Field Details

  • Constructor Details

    • RuntimeModel

      public RuntimeModel()
  • Method Details

    • 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
    • isWrapperFor

      public boolean isWrapperFor(Object object, 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:
      object - the potential wrapper to be tested
      type - the value type
      Returns:
      true iff object is a wrapper for values of type type
    • 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
    • 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