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 long serialVersionUID
    For serialization

    Fields inherited from class java.util.AbstractList

    modCount
  • Constructor Summary

    Constructors
    Constructor Description
    PathList()
    Construct an empty path list with the default initial capacity
    PathList​(int initialCapacity)
    Construct an empty path list with the given initial capacity
    PathList​(java.util.Collection<? extends IPath<E>> c)
    Construct a path list from the given Collection of IPath elements
    PathList​(IPath<E>... elements)
    Construct a path list from a varargs of IPath objects.
  • Method Summary

    Modifier and Type Method Description
    <R,​ P> R execute​(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, trimToSize

    Methods inherited from class java.util.AbstractCollection

    containsAll, toString

    Methods inherited from class java.lang.Object

    finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface java.util.Collection

    parallelStream, removeIf, stream, toArray

    Methods inherited from interface java.lang.Iterable

    forEach

    Methods 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 serialVersionUID
      For serialization
      See Also:
      Constant Field Values
  • Constructor Details

    • PathList

      public PathList()
      Construct an empty path list with the default initial capacity
    • PathList

      @SafeVarargs public PathList​(IPath<E>... elements)
      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

      public PathList​(java.util.Collection<? extends IPath<E>> c)
      Construct a path list from the given Collection of IPath elements
      Parameters:
      c - A collection of IPath elements to use
  • Method Details

    • execute

      public <R,​ P> R execute​(IPathsAlgo<R,​E,​P> algo, P... params)
      Description copied from interface: IPaths
      The "accept" method of the visitor hosts.
      Specified by:
      execute in interface IPaths<E>
      Type Parameters:
      R - The return type of the visitor algorithm
      P - The parameter type of the visitor algorithm.
      Parameters:
      algo - The visitor to accept
      params - The parameters to pass to the visitor execution
      Returns:
      The return value from the visitor execution.