public static class CombineWayAction.NodePair extends 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(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() |
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 NodePair
public 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 boolean contains(Node n)
n
- The node to look fortrue
if n
is in the pair, false
otherwise