|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList
org.geotools.graph.path.Walk
public class Walk
Represents a walk in a graph. A walk W is defined as an ordered set
of nodes that two adjacenct nodes in the set share
an edge. More precisley:
G = {N,E}
W = { n(i) in N | (n(i-1),n(i)) in E }
Field Summary |
---|
Fields inherited from class java.util.AbstractList |
---|
modCount |
Constructor Summary | |
---|---|
Walk()
|
|
Walk(java.util.Collection nodes)
|
Method Summary | |
---|---|
void |
add(int index,
java.lang.Object element)
|
boolean |
add(Node node)
Adds a node to the walk. |
boolean |
add(java.lang.Object o)
|
boolean |
addAll(java.util.Collection c)
|
boolean |
addAll(int index,
java.util.Collection c)
|
boolean |
addEdge(Edge e)
|
void |
addEdges(java.util.Collection edges)
|
protected java.util.List |
buildEdges()
Internal method for building the edge set of the walk. |
Path |
duplicate()
|
boolean |
equals(java.lang.Object other)
|
boolean |
equals(Walk other)
|
java.util.List |
getEdges()
Calculates the edges in the walk. |
Node |
getFirst()
Returns the first node in the sequence. |
Node |
getLast()
Returns the last node in the sequence. |
int |
hashCode()
|
boolean |
isClosed()
Determines if the walk is closed. |
boolean |
isValid()
A valid walk is one in which each pair of adjacent nodes in the sequence share an edge. |
java.lang.Object |
remove(int index)
|
void |
remove(Node node)
Removes a node from the walk. |
boolean |
remove(java.lang.Object o)
|
boolean |
removeAll(java.util.Collection c)
|
void |
reverse()
Reverses the path. |
java.util.Iterator |
riterator()
Returns an iterator that iterates over the path in reverse. |
void |
truncate(int index)
Truncates the path at the specified index. |
Methods inherited from class java.util.ArrayList |
---|
clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, removeRange, retainAll, set, size, subList, toArray, toArray, trimToSize |
Methods inherited from class java.util.AbstractCollection |
---|
containsAll, toString |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.geotools.graph.path.NodeSequence |
---|
iterator, size |
Methods inherited from interface java.util.List |
---|
containsAll |
Constructor Detail |
---|
public Walk()
public Walk(java.util.Collection nodes)
Method Detail |
---|
public boolean isValid()
isValid
in interface NodeSequence
public java.util.List getEdges()
public boolean add(Node node)
node
- Node to add to the walk.public void add(int index, java.lang.Object element)
add
in interface java.util.List
add
in class java.util.ArrayList
public boolean add(java.lang.Object o)
add
in interface java.util.Collection
add
in interface java.util.List
add
in class java.util.ArrayList
public boolean addAll(java.util.Collection c)
addAll
in interface java.util.Collection
addAll
in interface java.util.List
addAll
in class java.util.ArrayList
public boolean addAll(int index, java.util.Collection c)
addAll
in interface java.util.List
addAll
in class java.util.ArrayList
public boolean addEdge(Edge e)
public void addEdges(java.util.Collection edges)
public void remove(Node node)
node
- Node to remove from the walk.public java.lang.Object remove(int index)
remove
in interface java.util.List
remove
in class java.util.ArrayList
public boolean remove(java.lang.Object o)
remove
in interface java.util.Collection
remove
in interface java.util.List
remove
in class java.util.ArrayList
public boolean removeAll(java.util.Collection c)
removeAll
in interface java.util.Collection
removeAll
in interface java.util.List
removeAll
in class java.util.ArrayList
public boolean isClosed()
public Node getFirst()
NodeSequence
getFirst
in interface NodeSequence
NodeSequence.getFirst()
public Node getLast()
NodeSequence
getLast
in interface NodeSequence
NodeSequence.getLast()
protected java.util.List buildEdges()
public void reverse()
public void truncate(int index)
index
- The index of first node to be removed.public java.util.Iterator riterator()
public Path duplicate()
public boolean equals(java.lang.Object other)
equals
in interface java.util.Collection
equals
in interface java.util.List
equals
in class java.util.AbstractList
public boolean equals(Walk other)
public int hashCode()
hashCode
in interface java.util.Collection
hashCode
in interface java.util.List
hashCode
in class java.util.AbstractList
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |