Package provided.owlMaps.general.impl
Class Path<E>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList<E>
provided.owlMaps.general.impl.Path<E>
- Type Parameters:
E- The type of element in the path
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,java.lang.Iterable<E>,java.util.Collection<E>,java.util.List<E>,java.util.RandomAccess,IPath<E>,IPaths<E>
public class Path<E> extends java.util.ArrayList<E> implements IPath<E>
A concrete implementation of IPath 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 Path()Construct an empty path with the default capacity.Path(int initialCapacity)Construct an empty path with the given initial capacityPath(E... elements)Construct a path from a varargs of element values.Path(java.util.Collection<? extends E> c)Construct a path from the given Collection of elements -
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
-
Path
public Path()Construct an empty path with the default capacity. -
Path
Construct a path from a varargs of element values.- Parameters:
elements- Vararg of the elements to fill the path
-
Path
public Path(int initialCapacity)Construct an empty path with the given initial capacity- Parameters:
initialCapacity- the initial capacity of the list
-
Path
Construct a path from the given Collection of elements- Parameters:
c- A collection of 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.
-