public static class CombineWayAction.NodePair extends java.lang.Object
| Constructor and Description |
|---|
NodePair(CombineWayAction.NodePair other)
Constructs a new
NodePair. |
NodePair(Node a,
Node b)
Constructs a new
NodePair. |
NodePair(Pair<Node,Node> pair)
Constructs a new
NodePair. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(Node n)
Determines if this pair contains the given node.
|
boolean |
equals(java.lang.Object obj) |
Node |
getA()
Replies the first node.
|
Node |
getB()
Replies the second node
|
int |
hashCode() |
boolean |
isAdjacentToA(CombineWayAction.NodePair other) |
boolean |
isAdjacentToB(CombineWayAction.NodePair other) |
boolean |
isPredecessorOf(CombineWayAction.NodePair other) |
boolean |
isSuccessorOf(CombineWayAction.NodePair other) |
CombineWayAction.NodePair |
swap() |
java.lang.String |
toString() |
public NodePair(Node a, Node b)
NodePair.a - The first nodeb - The second nodepublic NodePair(Pair<Node,Node> pair)
NodePair.pair - An existing Pair of nodespublic NodePair(CombineWayAction.NodePair other)
NodePair.other - An existing NodePairpublic boolean isAdjacentToA(CombineWayAction.NodePair other)
public boolean isAdjacentToB(CombineWayAction.NodePair other)
public boolean isSuccessorOf(CombineWayAction.NodePair other)
public boolean isPredecessorOf(CombineWayAction.NodePair other)
public CombineWayAction.NodePair swap()
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean contains(Node n)
n - The node to look fortrue if n is in the pair, false otherwisepublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Object