Class Sequences

java.lang.Object
org.apache.druid.java.util.common.guava.Sequences

public class Sequences extends Object
  • Constructor Details

    • Sequences

      public Sequences()
  • Method Details

    • simple

      public static <T> Sequence<T> simple(Iterable<T> iterable)
    • empty

      public static <T> Sequence<T> empty()
    • concat

      @SafeVarargs public static <T> Sequence<T> concat(Sequence<T>... sequences)
    • concat

      public static <T> Sequence<T> concat(Iterable<Sequence<T>> sequences)
    • concat

      public static <T> Sequence<T> concat(Sequence<? extends Sequence<T>> sequences)
    • map

      public static <From, To> Sequence<To> map(Sequence<From> sequence, com.google.common.base.Function<? super From,? extends To> fn)
    • filter

      public static <T> Sequence<T> filter(Sequence<T> sequence, com.google.common.base.Predicate<? super T> pred)
    • withBaggage

      public static <T> Sequence<T> withBaggage(Sequence<T> seq, Closeable baggage)
    • wrap

      public static <T> Sequence<T> wrap(Sequence<T> seq, SequenceWrapper wrapper)
      Allows to execute something before, after or around the processing of the given sequence. See documentation to SequenceWrapper methods for some details.
    • withEffect

      public static <T> Sequence<T> withEffect(Sequence<T> seq, Runnable effect, Executor exec)
    • sort

      public static <T> Sequence<T> sort(Sequence<T> sequence, Comparator<T> comparator)
      Returns a sorted copy of the provided sequence. This will materialize the entire sequence in memory. Use at your own risk. The sort is stable, meaning that equal elements (as determined by the comparator) will not be reordered.
    • of

      public static <T> Sequence<T> of(T... values)