Package provided.owlMaps.general.impl
Class PathList<E>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList<IPath<E>>
provided.owlMaps.general.impl.PathList<E>
- Type Parameters:
E- The type of element in the paths in the path list
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,java.lang.Iterable<IPath<E>>,java.util.Collection<IPath<E>>,java.util.List<IPath<E>>,java.util.RandomAccess,IPathList<E>,IPaths<E>
public class PathList<E> extends java.util.ArrayList<IPath<E>> implements IPathList<E>
A concrete implementation of IPathList based on an ArrayList.
This implementation may not be suitable for all applications, particularly those
that require concurrent modification and thread safety.
- Author:
- swong
- See Also:
- Serialized Form
-
Field Summary
Fields Modifier and Type Field Description private static longserialVersionUIDFor serializationFields inherited from class java.util.AbstractList
modCount -
Constructor Summary
Constructors Constructor Description PathList()Construct an empty path list with the default initial capacityPathList(int initialCapacity)Construct an empty path list with the given initial capacityPathList(java.util.Collection<? extends IPath<E>> c)Construct a path list from the given Collection of IPath elementsPathList(IPath<E>... elements)Construct a path list from a varargs of IPath objects. -
Method Summary
Modifier and Type Method Description <R, P> Rexecute(IPathsAlgo<R,E,P> algo, P... params)The "accept" method of the visitor hosts.Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, equals, forEach, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSizeMethods inherited from class java.util.AbstractCollection
containsAll, toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.lang.Iterable
forEachMethods inherited from interface java.util.List
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDFor serialization- See Also:
- Constant Field Values
-
-
Constructor Details
-
PathList
public PathList()Construct an empty path list with the default initial capacity -
PathList
Construct a path list from a varargs of IPath objects.- Parameters:
elements- Vararg of the IPath objects to fill the path list
-
PathList
public PathList(int initialCapacity)Construct an empty path list with the given initial capacity- Parameters:
initialCapacity- The initial capacity of the list
-
PathList
Construct a path list from the given Collection of IPath elements- Parameters:
c- A collection of IPath elements to use
-
-
Method Details
-
execute
Description copied from interface:IPathsThe "accept" method of the visitor hosts.- Specified by:
executein interfaceIPaths<E>- Type Parameters:
R- The return type of the visitor algorithmP- The parameter type of the visitor algorithm.- Parameters:
algo- The visitor to acceptparams- The parameters to pass to the visitor execution- Returns:
- The return value from the visitor execution.
-