Class SparseArraySpliterator<E>

java.lang.Object
org.apache.jena.mem2.spliterator.SparseArraySpliterator<E>
Type Parameters:
E - the type of the array elements
All Implemented Interfaces:
Spliterator<E>

public class SparseArraySpliterator<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

    • SparseArraySpliterator

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

      public SparseArraySpliterator(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