|
SandMark version 3.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--sandmark.util.graph.Path
Field Summary | |
(package private) java.util.HashSet |
nodes
|
(package private) java.util.Vector |
path
|
Constructor Summary | |
Path()
Construct an empty path. |
|
Path(Path P)
Construct a copy of the path P . |
Method Summary | |
void |
add(Node node)
Add a node last to this path. |
void |
addFirst(Node node)
Add a node first to this path. |
Path |
concatenate(Path P)
Return a new path consisting of the nodes on the current path followed by the nodes on P . |
java.util.Enumeration |
elements()
Return an enumerator for the nodes on this path. |
boolean |
equals(java.lang.Object path2)
Return true if path2 is equal to this path. |
Node |
firstNode()
Return the first node on this path. |
Node |
get(int k)
Return the k:th node on this path. |
Node[] |
getPath()
Return an array of the nodes on this path. |
int |
hashCode()
Return a hash value for this path. |
java.util.Iterator |
iterator()
Return an iterator for the nodes on this path. |
Node |
lastNode()
Return the first last on this path. |
static void |
main(java.lang.String[] args)
|
boolean |
onPath(Node node)
Return true if node is on this path. |
Path |
segment(Node first,
Node last)
Return the segment of this path between node first
and last . |
int |
size()
Return the number of nodes on this path. |
(package private) static void |
test1()
|
java.lang.String |
toString()
Generate a string representation of this paths. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
java.util.Vector path
java.util.HashSet nodes
Constructor Detail |
public Path()
public Path(Path P)
P
.
Method Detail |
public void add(Node node)
node
- the node to be added.public void addFirst(Node node)
node
- the node to be added.public boolean onPath(Node node)
node
is on this path.
public Node[] getPath()
public Node get(int k)
public Node firstNode()
public Node lastNode()
public Path segment(Node first, Node last)
first
and last
.
first
- the first node on the pathlast
- the last node on the pathpublic Path concatenate(Path P)
P
.
P
- the path to be added.public int size()
public java.util.Enumeration elements()
public java.util.Iterator iterator()
public boolean equals(java.lang.Object path2)
path2
is equal to this path.
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
static void test1()
public static void main(java.lang.String[] args)
|
SandMark version 3.0 Wed Jan 29 10:30:05 MST 2003 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |