java.lang.Object
org.apache.jena.mem2.spliterator.ArraySubSpliterator<E>
- Type Parameters:
E-
- All Implemented Interfaces:
Spliterator<E>
A spliterator for arrays. This spliterator will iterate over the array
entries within the given boundaries.
This spliterator supports splitting into sub-spliterators.
The spliterator will check for concurrent modifications by invoking a Runnable
before each action.
-
Nested Class Summary
Nested classes/interfaces inherited from interface java.util.Spliterator
Spliterator.OfDouble, Spliterator.OfInt, Spliterator.OfLong, Spliterator.OfPrimitive<T extends Object,T_CONS extends Object, T_SPLITR extends Spliterator.OfPrimitive<T, T_CONS, T_SPLITR>> -
Field Summary
Fields inherited from interface java.util.Spliterator
CONCURRENT, DISTINCT, IMMUTABLE, NONNULL, ORDERED, SIZED, SORTED, SUBSIZED -
Constructor Summary
ConstructorsConstructorDescriptionArraySubSpliterator(E[] entries, int fromIndex, int toIndex, Runnable checkForConcurrentModification) Create a spliterator for the given array, with the given size.ArraySubSpliterator(E[] entries, Runnable checkForConcurrentModification) Create a spliterator for the given array, with the given size. -
Method Summary
Modifier and TypeMethodDescriptionintlongvoidforEachRemaining(Consumer<? super E> action) booleantryAdvance(Consumer<? super E> action) trySplit()Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Spliterator
getComparator, getExactSizeIfKnown, hasCharacteristics
-
Constructor Details
-
ArraySubSpliterator
public ArraySubSpliterator(E[] entries, int fromIndex, int toIndex, Runnable checkForConcurrentModification) Create a spliterator for the given array, with the given size.- Parameters:
entries- the arrayfromIndex- the index of the first element, inclusivetoIndex- the index of the last element, exclusivecheckForConcurrentModification- runnable to check for concurrent modifications
-
ArraySubSpliterator
Create a spliterator for the given array, with the given size.- Parameters:
entries- the arraycheckForConcurrentModification- runnable to check for concurrent modifications
-
-
Method Details
-
tryAdvance
- Specified by:
tryAdvancein interfaceSpliterator<E>
-
forEachRemaining
- Specified by:
forEachRemainingin interfaceSpliterator<E>
-
trySplit
- Specified by:
trySplitin interfaceSpliterator<E>
-
estimateSize
public long estimateSize()- Specified by:
estimateSizein interfaceSpliterator<E>
-
characteristics
public int characteristics()- Specified by:
characteristicsin interfaceSpliterator<E>
-