Class CollectSpliterators

java.lang.Object
com.google.common.collect.CollectSpliterators

final class CollectSpliterators extends Object
Spliterator utilities for common.collect internals.
  • Constructor Details

    • CollectSpliterators

      private CollectSpliterators()
  • Method Details

    • indexed

      static <T> Spliterator<T> indexed(int size, int extraCharacteristics, IntFunction<T> function)
    • indexed

      static <T> Spliterator<T> indexed(int size, int extraCharacteristics, IntFunction<T> function, @CheckForNull Comparator<? super T> comparator)
    • map

      static <InElementT, OutElementT> Spliterator<OutElementT> map(Spliterator<InElementT> fromSpliterator, Function<? super InElementT,? extends OutElementT> function)
      Returns a Spliterator over the elements of fromSpliterator mapped by function.
    • filter

      static <T> Spliterator<T> filter(Spliterator<T> fromSpliterator, Predicate<? super T> predicate)
      Returns a Spliterator filtered by the specified predicate.
    • flatMap

      static <InElementT, OutElementT> Spliterator<OutElementT> flatMap(Spliterator<InElementT> fromSpliterator, Function<? super InElementT,Spliterator<OutElementT>> function, int topCharacteristics, long topSize)
      Returns a Spliterator that iterates over the elements of the spliterators generated by applying function to the elements of fromSpliterator.
    • flatMapToInt

      static <InElementT> Spliterator.OfInt flatMapToInt(Spliterator<InElementT> fromSpliterator, Function<? super InElementT,Spliterator.OfInt> function, int topCharacteristics, long topSize)
      Returns a Spliterator.OfInt that iterates over the elements of the spliterators generated by applying function to the elements of fromSpliterator. (If function returns null for an input, it is replaced with an empty stream.)
    • flatMapToLong

      static <InElementT> Spliterator.OfLong flatMapToLong(Spliterator<InElementT> fromSpliterator, Function<? super InElementT,Spliterator.OfLong> function, int topCharacteristics, long topSize)
      Returns a Spliterator.OfLong that iterates over the elements of the spliterators generated by applying function to the elements of fromSpliterator. (If function returns null for an input, it is replaced with an empty stream.)
    • flatMapToDouble

      static <InElementT> Spliterator.OfDouble flatMapToDouble(Spliterator<InElementT> fromSpliterator, Function<? super InElementT,Spliterator.OfDouble> function, int topCharacteristics, long topSize)
      Returns a Spliterator.OfDouble that iterates over the elements of the spliterators generated by applying function to the elements of fromSpliterator. (If function returns null for an input, it is replaced with an empty stream.)