V - the graph vertex typepublic class VertexPair<V> extends Object implements Serializable
| Constructor and Description |
|---|
VertexPair(V n1,
V n2)
Create a new vertex pair
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
elementEquals(V element1,
V element2)
Compares two elements.
|
boolean |
equals(Object o) |
V |
getFirst()
Get the first vertex of the pair
|
V |
getOther(V one)
Given on of the vertices of the pair, get the other.
|
V |
getSecond()
Get the second vertex of the pair
|
int |
hashCode() |
boolean |
hasVertex(V v)
Assess if this pair contains the vertex.
|
String |
toString() |
public V getFirst()
public V getSecond()
public boolean hasVertex(V v)
v - The vertex in questionpublic V getOther(V one)
one - one of the verticesprotected boolean elementEquals(V element1, V element2)
element1 - the first elementelement2 - the second elementCopyright © 2016. All rights reserved.