Package org.postgresql.pljava.internal
Class AbstractNoSplitList<E>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
org.postgresql.pljava.internal.AbstractNoSplitList<E>
- All Implemented Interfaces:
Iterable<E>
,Collection<E>
,List<E>
,SequencedCollection<E>
- Direct Known Subclasses:
TupleList.Empty
,TupleList.SPI
An
AbstractList
whose parallelStream
method
returns a sequential stream (a behavior the spec does allow), and whose
spliterator
method returns a Spliterator
that
never splits.
In interfacing with the single-threaded PostgreSQL backend, there are many
uses for a class with the behavior of List
but that does not invite
unintended parallelism through the stream API.
-
Nested Class Summary
-
Field Summary
Fields inherited from class java.util.AbstractList
modCount
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription"It is allowable" (and, in this case, inevitable) for this method to return a sequential stream.Returns aSpliterator
that never splits.Methods inherited from class java.util.AbstractList
add, add, addAll, clear, equals, get, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, size, toArray, toArray, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
removeIf, stream, toArray
Methods inherited from interface java.util.List
addAll, addFirst, addLast, contains, containsAll, getFirst, getLast, isEmpty, remove, removeAll, removeFirst, removeLast, replaceAll, retainAll, reversed, size, sort, toArray, toArray
-
Constructor Details
-
AbstractNoSplitList
public AbstractNoSplitList()
-
-
Method Details
-
parallelStream
"It is allowable" (and, in this case, inevitable) for this method to return a sequential stream. -
spliterator
Returns aSpliterator
that never splits.
-