|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.spy.util.SPVertex<N>
public class SPVertex<N extends SPNode<N>>
A weighted connection to a SPNode.
ShortestPathFinder| Field Summary | |
|---|---|
static int |
DEFAULT_COST
|
| Constructor Summary | |
|---|---|
SPVertex(N destination)
Get an instance of SPVertex linking the two nodes with the default cost. |
|
SPVertex(N destination,
int theCost)
Get an instance of SPVertex. |
|
| Method Summary | |
|---|---|
int |
compareTo(SPVertex<N> other)
Compare this vertex to another vertex. |
int |
getCost()
Get the cost of this vertex. |
N |
getTo()
Get the destination node. |
java.lang.String |
toString()
String me. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int DEFAULT_COST
| Constructor Detail |
|---|
public SPVertex(N destination,
int theCost)
destination - the destination nodetheCost - the costpublic SPVertex(N destination)
destination - the destination node| Method Detail |
|---|
public java.lang.String toString()
toString in class java.lang.Objectpublic N getTo()
public int getCost()
public int compareTo(SPVertex<N> other)
compareTo in interface java.lang.Comparable<SPVertex<N extends SPNode<N>>>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||