public class RebuildingContextImpl extends java.lang.Object implements RebuildingContext
RebuildingContextImpl implements RebuildingContext storing the relation from an old node to the new
node in a Map in which the key is the old node.| Constructor and Description |
|---|
RebuildingContextImpl()
Default constructor
|
RebuildingContextImpl(RebuildingContext oldContext)
Constructor creating a
RebuildingContext out of an old RebuildingContext |
| Modifier and Type | Method and 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> |
getUpdated(T node)
Returns resolved node of type T or null if is not yet resolved.
|
<T extends Node> |
getUpdatedOrSame(T node)
Returns updated or same(given) node from context.
|
<T extends Node> |
put(T key,
T newNode)
Holds relation between old node and new node
|
public RebuildingContextImpl()
public RebuildingContextImpl(RebuildingContext oldContext)
RebuildingContext out of an old RebuildingContextoldContext - the old rebuilding contextpublic <T extends Node> void put(T key, T newNode)
RebuildingContextput in interface RebuildingContextT - the type of Nodekey - as existing nodenewNode - as enhanced nodepublic boolean containsUpdated(Node node)
RebuildingContextcontainsUpdated in interface RebuildingContextnode - the instruction node for which it shall be checked if an updated version exists for ittrue if the context contains an updated version, false if not.public <T extends Node> T getUpdatedOrSame(T node)
RebuildingContextgetUpdatedOrSame in interface RebuildingContextT - the type of Nodenode - to be see if updated.public java.util.Map<Node,Node> getRebuildingMap()
RebuildingContextgetRebuildingMap in interface RebuildingContextpublic <T extends Node> T getUpdated(T node)
RebuildingContextgetUpdated in interface RebuildingContextT - the type of Nodenode - to get the update from