Interface Sequence<T>

    • Method Detail

      • accumulate

        <OutType> OutType accumulate​(OutType initValue,
                                     Accumulator<OutType,​T> accumulator)
        Accumulate this sequence using the given accumulator.
        Type Parameters:
        OutType - the type of accumulated value.
        Parameters:
        initValue - the initial value to pass along to start the accumulation.
        accumulator - the accumulator which is responsible for accumulating input values.
        Returns:
        accumulated value.
      • toYielder

        <OutType> Yielder<OutType> toYielder​(OutType initValue,
                                             YieldingAccumulator<OutType,​T> accumulator)
        Return a Yielder for accumulated sequence.
        Type Parameters:
        OutType - the type of accumulated value.
        Parameters:
        initValue - the initial value to pass along to start the accumulation.
        accumulator - the accumulator which is responsible for accumulating input values.
        Returns:
        a Yielder for accumulated sequence.
        See Also:
        Yielder
      • filter

        default Sequence<T> filter​(com.google.common.base.Predicate<? super T> predicate)
      • toList

        default List<T> toList()
        This will materialize the entire sequence. Use at your own risk.
      • skip

        default Sequence<T> skip​(long skip)
      • limit

        default Sequence<T> limit​(long limit)
      • flatMerge

        default <R> Sequence<R> flatMerge​(Function<? super T,​? extends Sequence<? extends R>> mapper,
                                          com.google.common.collect.Ordering<? super R> ordering)
      • forEach

        default void forEach​(Consumer<? super T> action)