Package org.jgrapht.util
Class VertexPair<V>
- java.lang.Object
-
- org.jgrapht.util.VertexPair<V>
-
- Type Parameters:
V
- the graph vertex type
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
UnorderedVertexPair
@Deprecated public class VertexPair<V> extends java.lang.Object implements java.io.Serializable
Deprecated.in favor ofPair
Representation of a pair of vertices; to be replaced by Pair<V,V> if Sun ever gets around to adding Pair to java.util.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected V
n1
Deprecated.protected V
n2
Deprecated.private static long
serialVersionUID
Deprecated.
-
Constructor Summary
Constructors Constructor Description VertexPair(V n1, V n2)
Deprecated.Create a new vertex pair
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected boolean
elementEquals(V element1, V element2)
Deprecated.Compares two elements.boolean
equals(java.lang.Object o)
Deprecated.V
getFirst()
Deprecated.Get the first vertex of the pairV
getOther(V one)
Deprecated.Given on of the vertices of the pair, get the other.V
getSecond()
Deprecated.Get the second vertex of the pairint
hashCode()
Deprecated.boolean
hasVertex(V v)
Deprecated.Assess if this pair contains the vertex.java.lang.String
toString()
Deprecated.
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
Deprecated.- See Also:
- Constant Field Values
-
n1
protected final V n1
Deprecated.
-
n2
protected final V n2
Deprecated.
-
-
Method Detail
-
getFirst
public V getFirst()
Deprecated.Get the first vertex of the pair- Returns:
- the first vertex of the pair
-
getSecond
public V getSecond()
Deprecated.Get the second vertex of the pair- Returns:
- the second vertex of the pair
-
hasVertex
public boolean hasVertex(V v)
Deprecated.Assess if this pair contains the vertex.- Parameters:
v
- The vertex in question- Returns:
- true if contains, false otherwise
-
getOther
public V getOther(V one)
Deprecated.Given on of the vertices of the pair, get the other.- Parameters:
one
- one of the vertices- Returns:
- the other vertex of the pair
-
toString
public java.lang.String toString()
Deprecated.- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
Deprecated.- Overrides:
equals
in classjava.lang.Object
-
elementEquals
protected boolean elementEquals(V element1, V element2)
Deprecated.Compares two elements. Returns true if they are both null, or when they are equal.- Parameters:
element1
- the first elementelement2
- the second element- Returns:
- true if they are both null, or when they are equal, false otherwise.
-
hashCode
public int hashCode()
Deprecated.- Overrides:
hashCode
in classjava.lang.Object
-
-