public class NodeWrapper extends java.lang.Object implements Node
| Constructor and Description |
|---|
NodeWrapper(Node wrappedNode) |
| Modifier and Type | Method and Description |
|---|---|
void |
addEdge(Edge edge)
Adds an edge to this node, if it doesn't exist yet.
|
boolean |
equals(java.lang.Object obj) |
java.util.Collection<Edge> |
getEdges()
Returns all ingoing and outgoing edges of this node.
|
<T> java.util.Optional<T> |
getMetaInformation(java.lang.Class<T> clazz)
Gets the meta information contained in this node if it exists.
|
java.util.Optional<Position> |
getOldPosition()
Get the previous position of this node, if any exists.
|
Position |
getPosition()
Get the current position of this node.
|
java.lang.Object |
getValue()
Returns the value stored in this node.
|
Node |
getWrappedNode() |
int |
hashCode() |
void |
removeEdge(Edge edge)
Removes an edge from this node, if it exists.
|
<T> void |
setMetaInformation(T meta)
Set the meta information contained in this node.
|
void |
setOldPosition(Position oldPosition)
Set the old position to the given position.
|
void |
setPosition(Position position)
Set the position of this node.
|
void |
setValue(java.lang.Object value)
Sets the value stored in this node.
|
java.lang.String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitdistance, distanceSquared, getEdgeForNeighbor, getIncomingEdges, getNeighbors, getOutgoingEdges, getPredecessors, getSuccessors, hasSuccessor, setOldPositionpublic NodeWrapper(Node wrappedNode)
public Node getWrappedNode()
public java.lang.Object getValue()
Nodepublic void setValue(java.lang.Object value)
Nodepublic void addEdge(Edge edge)
Nodepublic void removeEdge(Edge edge)
NoderemoveEdge in interface Nodeedge - The edge to remove.public java.util.Collection<Edge> getEdges()
Nodepublic java.util.Optional<Position> getOldPosition()
NodegetOldPosition in interface Nodepublic void setOldPosition(Position oldPosition)
NodesetOldPosition in interface NodeoldPosition - The new old position.public Position getPosition()
NodegetPosition in interface Nodepublic void setPosition(Position position)
NodesetPosition in interface Nodeposition - The new position.public <T> void setMetaInformation(T meta)
NodesetMetaInformation in interface NodeT - The type of the new piece of meta information.meta - The new piece of meta information.public <T> java.util.Optional<T> getMetaInformation(java.lang.Class<T> clazz)
NodegetMetaInformation in interface NodeT - The type of the meta information object.clazz - The class of the meta information object.public java.lang.String toString()
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Object