Class SparseArrayIndexedSpliterator<E>

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

public class SparseArrayIndexedSpliterator<E> extends Object implements Spliterator<FastHashSet.IndexedKey<E>>
A spliterator for sparse arrays. This spliterator will iterate over the array skipping null entries. This spliterator returns elements as FastHashSet.IndexedKey objects, which contain both the index and the value of the element.

This spliterator works in ascending order, starting from the given start up to the specified exclusive index.

This spliterator supports splitting into sub-spliterators.

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

  • Constructor Details

    • SparseArrayIndexedSpliterator

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

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

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