Class CursorSpliterator<T>

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface java.util.Spliterator

        java.util.Spliterator.OfDouble, java.util.Spliterator.OfInt, java.util.Spliterator.OfLong, java.util.Spliterator.OfPrimitive<T extends java.lang.Object,​T_CONS extends java.lang.Object,​T_SPLITR extends java.util.Spliterator.OfPrimitive<T,​T_CONS,​T_SPLITR>>
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int characteristics
      Characteristics always include SIZED | SUBSIZED.
      private Cursor<T> cursor
      The underlying cursor, positioned such that cursor.next() yields the element at index.
      private long fence
      One past last index
      private long index
      The current index, modified on advance/split.
      • Fields inherited from interface java.util.Spliterator

        CONCURRENT, DISTINCT, IMMUTABLE, NONNULL, ORDERED, SIZED, SORTED, SUBSIZED
    • Constructor Summary

      Constructors 
      Constructor Description
      CursorSpliterator​(Cursor<T> cursor, long origin, long fence, int additionalCharacteristics)
      Creates a spliterator covering the given range.
    • Field Detail

      • cursor

        private final Cursor<T> cursor
        The underlying cursor, positioned such that cursor.next() yields the element at index.
      • index

        private long index
        The current index, modified on advance/split.
      • fence

        private final long fence
        One past last index
      • characteristics

        private final int characteristics
        Characteristics always include SIZED | SUBSIZED.
    • Constructor Detail

      • CursorSpliterator

        public CursorSpliterator​(Cursor<T> cursor,
                                 long origin,
                                 long fence,
                                 int additionalCharacteristics)
        Creates a spliterator covering the given range.
        Parameters:
        cursor - provides elements, starting with the element at origin, on cursor.next()
        origin - the least index (inclusive) to cover
        fence - one past the greatest index to cover
        additionalCharacteristics - additional characteristics besides SIZED | SUBSIZED