Class SparseArraySubSpliterator<E>

java.lang.Object
org.apache.jena.mem2.spliterator.SparseArraySubSpliterator<E>
Type Parameters:
E -
All Implemented Interfaces:
Spliterator<E>

public class SparseArraySubSpliterator<E> extends Object implements Spliterator<E>
A spliterator for sparse arrays. This spliterator will iterate over the array skipping null entries.

This spliterator supports splitting into sub-spliterators.

The spliterator will check for concurrent modifications by invoking a Runnable before each action.

  • Constructor Details

    • SparseArraySubSpliterator

      public SparseArraySubSpliterator(E[] entries, int fromIndex, int toIndex, Runnable checkForConcurrentModification)
      Create a spliterator for the given array, with the given size.
      Parameters:
      entries - the array
      fromIndex - the index of the first element, inclusive
      toIndex - the index of the last element, exclusive
      checkForConcurrentModification - runnable to check for concurrent modifications
    • SparseArraySubSpliterator

      public SparseArraySubSpliterator(E[] entries, Runnable checkForConcurrentModification)
      Create a spliterator for the given array, with the given size.
      Parameters:
      entries - the array
      checkForConcurrentModification - runnable to check for concurrent modifications
  • Method Details