Package org.geotools.graph.path
Class Path
- All Implemented Interfaces:
Serializable,Cloneable,Iterable<Node>,Collection<Node>,List<Node>,RandomAccess,NodeSequence
Represents a path in a graph. A path P is defined as a walk in which there are no node repetitions.
- Author:
- Justin Deoliveira, Refractions Research Inc, jdeolive@refractions.net
- See Also:
-
Field Summary
Fields inherited from class AbstractList
modCount -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class Walk
add, add, addAll, addAll, addEdge, addEdges, buildEdges, duplicate, equals, equals, getEdges, getFirst, getLast, hashCode, isClosed, remove, remove, remove, removeAll, reverse, riterator, truncateMethods inherited from class ArrayList
clear, clone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSizeMethods inherited from class AbstractCollection
containsAll, toStringMethods inherited from interface Collection
parallelStream, stream, toArrayMethods inherited from interface List
containsAllMethods inherited from interface NodeSequence
iterator, size
-
Constructor Details
-
Path
public Path() -
Path
-
-
Method Details
-
isValid
public boolean isValid()Tests if the path is valid. A valid path satisfies two conditions:
1. Each pair of adjacent nodes share an edge.
2. There are no node repetitions.- Specified by:
isValidin interfaceNodeSequence- Overrides:
isValidin classWalk- Returns:
- True if valid, otherwise false.
-