|
||||||||||
| 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.AbstractSequentialList<E>
java.util.LinkedList<E>
bcds.phison.Path<V,E>
public class Path<V,E>
A Path object is a list of links all belonging to the same
SimGraph object.
| Field Summary | |
|---|---|
SimGraph<V,E> |
g
The SimGraph to which this path is bound. |
| Fields inherited from class java.util.AbstractList |
|---|
modCount |
| Constructor Summary | |
|---|---|
Path(SimGraph<V,E> g)
Construct a new path bound to a given SimGraph. |
|
| Method Summary | |
|---|---|
java.util.List<V> |
nodes()
Returns the list of nodes in this path. |
Path<V,E> |
reverse()
Given a path a-b-c-d, returns d-c-b-a. |
V |
source()
Returns the source node of the this path object. |
Path<V,E> |
subList(int start,
int end)
Returns a sublist of links of this path. |
V |
target()
Returns the target node of the this path object. |
java.lang.String |
toString()
Returns a string of the form v1-v2-v3-...-vn, or the empty string if this path is null. |
| Methods inherited from class java.util.LinkedList |
|---|
add, add, addAll, addAll, addFirst, addLast, clear, clone, contains, descendingIterator, element, get, getFirst, getLast, indexOf, lastIndexOf, listIterator, offer, offerFirst, offerLast, peek, peekFirst, peekLast, poll, pollFirst, pollLast, pop, push, remove, remove, remove, removeFirst, removeFirstOccurrence, removeLast, removeLastOccurrence, set, size, toArray, toArray |
| Methods inherited from class java.util.AbstractSequentialList |
|---|
iterator |
| Methods inherited from class java.util.AbstractList |
|---|
equals, hashCode, listIterator, removeRange |
| Methods inherited from class java.util.AbstractCollection |
|---|
containsAll, isEmpty, removeAll, retainAll |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.List |
|---|
containsAll, equals, hashCode, isEmpty, iterator, listIterator, removeAll, retainAll |
| Methods inherited from interface java.util.Deque |
|---|
iterator |
| Field Detail |
|---|
public final SimGraph<V,E> g
SimGraph to which this path is bound.
Changing this attribute after instantiation is highly
discouraged (this will break).
| Constructor Detail |
|---|
public Path(SimGraph<V,E> g)
SimGraph.
| Method Detail |
|---|
public java.lang.String toString()
toString in class java.util.AbstractCollection<E>public V source()
java.lang.IndexOutOfBoundsException - when the path is empty.public V target()
java.lang.IndexOutOfBoundsException - when the path is empty.public Path<V,E> reverse()
public Path<V,E> subList(int start,
int end)
subList in interface java.util.List<E>subList in class java.util.AbstractList<E>public java.util.List<V> nodes()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||