Package org.tensorics.core.tree.domain
Interface RebuildingContext
-
- All Known Implementing Classes:
RebuildingContextImpl
public interface RebuildingContext
Represents a container, which contains a certain amount of results for operations. It will provide them to the layers of resolution to (partly) replace the resolvable context.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
containsUpdated(Node node)
Checks if the context contains already an updated version of the given node.java.util.Map<Node,Node>
getRebuildingMap()
Returns a map of instruction nodes to instruction nodes, which contains the nodes to be replaced as key and the nodes which shall replace the old nodes as values.<T extends Node>
TgetUpdated(T node)
Returns resolved node of type T or null if is not yet resolved.<T extends Node>
TgetUpdatedOrSame(T node)
Returns updated or same(given) node from context.<T extends Node>
voidput(T oldNode, T newNode)
Holds relation between old node and new node
-
-
-
Method Detail
-
getUpdatedOrSame
<T extends Node> T getUpdatedOrSame(T node)
Returns updated or same(given) node from context.- Type Parameters:
T
- the type ofNode
- Parameters:
node
- to be see if updated.- Returns:
- node or updated node from context.
-
getUpdated
<T extends Node> T getUpdated(T node)
Returns resolved node of type T or null if is not yet resolved.- Type Parameters:
T
- the type ofNode
- Parameters:
node
- to get the update from- Returns:
- the updated node
-
containsUpdated
boolean containsUpdated(Node node)
Checks if the context contains already an updated version of the given node.- Parameters:
node
- the instruction node for which it shall be checked if an updated version exists for it- Returns:
true
if the context contains an updated version,false
if not.
-
getRebuildingMap
java.util.Map<Node,Node> getRebuildingMap()
Returns a map of instruction nodes to instruction nodes, which contains the nodes to be replaced as key and the nodes which shall replace the old nodes as values.- Returns:
- the replacement mapping
-
-