Package org.jgrapht.alg.shortestpath
Class AbstractPathElementList<V,E,T extends AbstractPathElement<V,E>>
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<T>
-
- org.jgrapht.alg.shortestpath.AbstractPathElementList<V,E,T>
-
- All Implemented Interfaces:
java.lang.Iterable<T>,java.util.Collection<T>,java.util.List<T>
- Direct Known Subclasses:
RankingPathElementList
abstract class AbstractPathElementList<V,E,T extends AbstractPathElement<V,E>> extends java.util.AbstractList<T>List of pathsAbstractPathElementwith same target vertex.- Since:
- July 5, 2007
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractPathElementList(Graph<V,E> graph, int maxSize, AbstractPathElementList<V,E,T> elementList, E edge)Creates paths obtained by concatenating the specified edge to the specified paths.protectedAbstractPathElementList(Graph<V,E> graph, int maxSize, T pathElement)Creates a list with an empty path.protectedAbstractPathElementList(Graph<V,E> graph, int maxSize, V vertex)Creates an empty list.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Tget(int index)Returns pathAbstractPathElementstored at the specified index.VgetVertex()Returns target vertex.intsize()Returns the number of paths stored in the list.-
Methods inherited from class java.util.AbstractList
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList
-
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
-
-
-
-
Constructor Detail
-
AbstractPathElementList
protected AbstractPathElementList(Graph<V,E> graph, int maxSize, AbstractPathElementList<V,E,T> elementList, E edge)
Creates paths obtained by concatenating the specified edge to the specified paths.- Parameters:
maxSize- maximum number of paths the list is able to store.elementList- paths, list ofAbstractPathElement.edge- edge reaching the end vertex of the created paths.- Throws:
java.lang.NullPointerException- if the specified prevPathElementList or edge isnull.java.lang.IllegalArgumentException- ifmaxSizeis negative or 0.
-
AbstractPathElementList
protected AbstractPathElementList(Graph<V,E> graph, int maxSize, T pathElement)
Creates a list with an empty path. The list size is 1.- Parameters:
maxSize- maximum number of paths the list is able to store.- Throws:
java.lang.NullPointerException- if the specified path-element isnull.java.lang.IllegalArgumentException- ifmaxSizeis negative or 0.java.lang.IllegalArgumentException- ifpathElementis not empty.
-
-