Top Fields Constructors Methods
org.jooq.lambda

pack-priv Class SeqImpl<T>

extends Object
implements Seq<T>
Class Inheritance
All Implemented Interfaces
org.jooq.lambda.Seq, org.jooq.lambda.Collectable, java.lang.Iterable, java.util.stream.Stream, java.util.stream.BaseStream, java.lang.AutoCloseable
Static Imports
java.util.Comparator.naturalOrder, java.util.stream.Collectors.*

Author
Lukas Eder

Field Summary

Modifier and TypeField and Description
private Object[]
pack-priv static final Object
private final Stream<? extends T>

Constructor Summary

AccessConstructor and Description
pack-priv
SeqImpl(Stream<? extends T> stream)

Method Summary

Modifier and TypeMethod and Description
public boolean
allMatch(Predicate<? super T> predicate)

Implements java.util.stream.Stream.allMatch, org.jooq.lambda.Collectable.allMatch.

Returns whether all elements of this stream match the provided predicate.

public boolean
anyMatch(Predicate<? super T> predicate)

Implements java.util.stream.Stream.anyMatch, org.jooq.lambda.Collectable.anyMatch.

Returns whether any elements of this stream match the provided predicate.

public Optional<T>
avg()

Implements org.jooq.lambda.Collectable.avg.

Get the average of the elements in this collectable.

public <U> Optional<U>
avg(Function<? super T, ? extends U> function)

Implements org.jooq.lambda.Collectable.avg.

Get the average of the elements in this collectable.

public double
avgDouble(ToDoubleFunction<? super T> function)

Implements org.jooq.lambda.Collectable.avgDouble.

Get the average of the elements in this collectable as double.

public double
avgInt(ToIntFunction<? super T> function)

Implements org.jooq.lambda.Collectable.avgInt.

Get the average of the elements in this collectable as int.

public double
avgLong(ToLongFunction<? super T> function)

Implements org.jooq.lambda.Collectable.avgLong.

Get the average of the elements in this collectable as long.

public Optional<T>
bitAnd()

Implements org.jooq.lambda.Collectable.bitAnd.

Collect all bits in this stream into a single value by applying bitwise and.

public <U> Optional<U>
bitAnd(Function<? super T, ? extends U> function)

Implements org.jooq.lambda.Collectable.bitAnd.

Collect all bits in this stream into a single value by applying bitwise and.

public int
bitAndInt(ToIntFunction<? super T> function)

Implements org.jooq.lambda.Collectable.bitAndInt.

Collect all bits in this stream into a single value by applying bitwise and.

public long
bitAndLong(ToLongFunction<? super T> function)

Implements org.jooq.lambda.Collectable.bitAndLong.

Collect all bits in this stream into a single value by applying bitwise and.

public Optional<T>
bitOr()

Implements org.jooq.lambda.Collectable.bitOr.

Collect all bits in this stream into a single value by applying bitwise or.

public <U> Optional<U>
bitOr(Function<? super T, ? extends U> function)

Implements org.jooq.lambda.Collectable.bitOr.

Collect all bits in this stream into a single value by applying bitwise or.

public int
bitOrInt(ToIntFunction<? super T> function)

Implements org.jooq.lambda.Collectable.bitOrInt.

Collect all bits in this stream into a single value by applying bitwise or.

public long
bitOrLong(ToLongFunction<? super T> function)

Implements org.jooq.lambda.Collectable.bitOrLong.

Collect all bits in this stream into a single value by applying bitwise or.

public void
close()

Implements org.jooq.lambda.Seq.close.

Closes this stream, causing all close handlers for this stream pipeline to be called.

public <R> R
collect(Supplier<R> supplier, BiConsumer<R, ? super T> accumulator, BiConsumer<R, R> combiner)

Implements java.util.stream.Stream.collect.

Performs a mutable reduction operation on the elements of this stream.

public <R, A> R
collect(Collector<? super T, A, R> collector)

Implements java.util.stream.Stream.collect, org.jooq.lambda.Collectable.collect.

Performs a mutable reduction operation on the elements of this stream using a Collector.

public String
commonPrefix()

Implements org.jooq.lambda.Collectable.commonPrefix.

Get the common prefix of all strings (or to-stringed values) in this stream.

public String
commonSuffix()

Implements org.jooq.lambda.Collectable.commonSuffix.

Get the common prefix of all strings (or to-stringed values) in this stream.

public long
count()

Implements org.jooq.lambda.Seq.count.

Returns the count of elements in this stream.

public long
count(Predicate<? super T> predicate)

Implements org.jooq.lambda.Collectable.count.

Count the values in this collectable, for which a predicate evaluates to true.

public long
countDistinct()

Implements org.jooq.lambda.Collectable.countDistinct.

Count the distinct values in this collectable.

public long
countDistinct(Predicate<? super T> predicate)

Implements org.jooq.lambda.Collectable.countDistinct.

Count the distinct values in this collectable, for which a predicate evaluates to true.

public <U> long
countDistinctBy(Function<? super T, ? extends U> function)

Implements org.jooq.lambda.Collectable.countDistinctBy.

Count the distinct values of a given expression in this collectable.

public <U> long
countDistinctBy(Function<? super T, ? extends U> function, Predicate<? super U> predicate)

Implements org.jooq.lambda.Collectable.countDistinctBy.

Count the distinct values of a given expression in this collectable, for which a predicate evaluates to true.

public Seq<T>
distinct()

Implements org.jooq.lambda.Seq.distinct.

Returns a stream consisting of the distinct elements (according to Object#equals(Object)) of this stream.

public Seq<T>
filter(Predicate<? super T> predicate)

Implements org.jooq.lambda.Seq.filter.

Returns a stream consisting of the elements of this stream that match the given predicate.

public Optional<T>
findAny()

Implements java.util.stream.Stream.findAny.

Returns an Optional describing some element of the stream, or an empty Optional if the stream is empty.

public Optional<T>
findFirst()

Implements java.util.stream.Stream.findFirst.

Returns an Optional describing the first element of this stream, or an empty Optional if the stream is empty.

public <R> Seq<R>
flatMap(Function<? super T, ? extends Stream<? extends R>> mapper)

Implements org.jooq.lambda.Seq.flatMap.

Returns a stream consisting of the results of replacing each element of this stream with the contents of a mapped stream produced by applying the provided mapping function to each element.

public DoubleStream
flatMapToDouble(Function<? super T, ? extends DoubleStream> mapper)

Implements org.jooq.lambda.Seq.flatMapToDouble.

Returns an DoubleStream consisting of the results of replacing each element of this stream with the contents of a mapped stream produced by applying the provided mapping function to each element.

public IntStream
flatMapToInt(Function<? super T, ? extends IntStream> mapper)

Implements org.jooq.lambda.Seq.flatMapToInt.

Returns an IntStream consisting of the results of replacing each element of this stream with the contents of a mapped stream produced by applying the provided mapping function to each element.

public LongStream
flatMapToLong(Function<? super T, ? extends LongStream> mapper)

Implements org.jooq.lambda.Seq.flatMapToLong.

Returns an LongStream consisting of the results of replacing each element of this stream with the contents of a mapped stream produced by applying the provided mapping function to each element.

public void
forEach(Consumer<? super T> action)

Overrides default org.jooq.lambda.Seq.forEach.

Performs an action for each element of this stream.

public void
forEachOrdered(Consumer<? super T> action)

Implements java.util.stream.Stream.forEachOrdered.

Performs an action for each element of this stream, in the encounter order of the stream if the stream has a defined encounter order.

public String
format()

Implements org.jooq.lambda.Seq.format.

Generate a nicely formatted representation of this stream.

public boolean

Returns:

false
isParallel
()

Implements java.util.stream.BaseStream.isParallel.

Always returns false.

public Iterator<T>
iterator()

Implements java.util.stream.BaseStream.iterator, java.lang.Iterable.iterator.

Returns an iterator over elements of type T.

public Seq<T>
limit(long maxSize)

Implements org.jooq.lambda.Seq.limit.

Returns a stream consisting of the elements of this stream, truncated to be no longer than maxSize in length.

public <R> Seq<R>
map(Function<? super T, ? extends R> mapper)

Implements org.jooq.lambda.Seq.map.

Returns a stream consisting of the results of applying the given function to the elements of this stream.

public DoubleStream
mapToDouble(ToDoubleFunction<? super T> mapper)

Implements org.jooq.lambda.Seq.mapToDouble.

Returns a DoubleStream consisting of the results of applying the given function to the elements of this stream.

public IntStream
mapToInt(ToIntFunction<? super T> mapper)

Implements org.jooq.lambda.Seq.mapToInt.

Returns an IntStream consisting of the results of applying the given function to the elements of this stream.

public LongStream
mapToLong(ToLongFunction<? super T> mapper)

Implements org.jooq.lambda.Seq.mapToLong.

Returns a LongStream consisting of the results of applying the given function to the elements of this stream.

public Optional<T>
max()

Implements org.jooq.lambda.Collectable.max.

Get the maximum value.

public Optional<T>
max(Comparator<? super T> comparator)

Implements java.util.stream.Stream.max, org.jooq.lambda.Collectable.max.

Returns the maximum element of this stream according to the provided Comparator.

public <U extends Comparable<? super U>> Optional<U>
max(Function<? super T, ? extends U> function)

Implements org.jooq.lambda.Collectable.max.

Get the maximum value by a function.

public <U> Optional<U>
max(Function<? super T, ? extends U> function, Comparator<? super U> comparator)

Implements org.jooq.lambda.Collectable.max.

Get the maximum value by a function.

public Seq<T>
maxAll()

Implements org.jooq.lambda.Collectable.maxAll.

Get the maximum values.

public Seq<T>
maxAll(Comparator<? super T> comparator)

Implements org.jooq.lambda.Collectable.maxAll.

Get the maximum values by a function.

public <U extends Comparable<? super U>> Seq<U>
maxAll(Function<? super T, ? extends U> function)

Implements org.jooq.lambda.Collectable.maxAll.

Get the maximum values by a function.

public <U> Seq<U>
maxAll(Function<? super T, ? extends U> function, Comparator<? super U> comparator)

Implements org.jooq.lambda.Collectable.maxAll.

Get the maximum values by a function.

public <U extends Comparable<? super U>> Seq<T>
maxAllBy(Function<? super T, ? extends U> function)

Implements org.jooq.lambda.Collectable.maxAllBy.

Get the maximum values by a function.

public <U> Seq<T>
maxAllBy(Function<? super T, ? extends U> function, Comparator<? super U> comparator)

Implements org.jooq.lambda.Collectable.maxAllBy.

Get the maximum values by a function.

public <U extends Comparable<? super U>> Optional<T>
maxBy(Function<? super T, ? extends U> function)

Implements org.jooq.lambda.Collectable.maxBy.

Get the maximum value by a function.

public <U> Optional<T>
maxBy(Function<? super T, ? extends U> function, Comparator<? super U> comparator)

Implements org.jooq.lambda.Collectable.maxBy.

Get the maximum value by a function.

public Optional<T>
median()

Implements org.jooq.lambda.Collectable.median.

Get the median value.

public Optional<T>
median(Comparator<? super T> comparator)

Implements org.jooq.lambda.Collectable.median.

Get the median value.

public <U extends Comparable<? super U>> Optional<T>
medianBy(Function<? super T, ? extends U> function)

Implements org.jooq.lambda.Collectable.medianBy.

Get the median value by a function.

public <U> Optional<T>
medianBy(Function<? super T, ? extends U> function, Comparator<? super U> comparator)

Implements org.jooq.lambda.Collectable.medianBy.

Get the median value by a function.

public Optional<T>
min()

Implements org.jooq.lambda.Collectable.min.

Get the minimum value.

public Optional<T>
min(Comparator<? super T> comparator)

Implements java.util.stream.Stream.min, org.jooq.lambda.Collectable.min.

Returns the minimum element of this stream according to the provided Comparator.

public <U extends Comparable<? super U>> Optional<U>
min(Function<? super T, ? extends U> function)

Implements org.jooq.lambda.Collectable.min.

Get the minimum value by a function.

public <U> Optional<U>
min(Function<? super T, ? extends U> function, Comparator<? super U> comparator)

Implements org.jooq.lambda.Collectable.min.

Get the minimum value by a function.

public Seq<T>
minAll()

Implements org.jooq.lambda.Collectable.minAll.

Get the minimum values.

public Seq<T>
minAll(Comparator<? super T> comparator)

Implements org.jooq.lambda.Collectable.minAll.

Get the minimum values by a function.

public <U extends Comparable<? super U>> Seq<U>
minAll(Function<? super T, ? extends U> function)

Implements org.jooq.lambda.Collectable.minAll.

Get the minimum values by a function.

public <U> Seq<U>
minAll(Function<? super T, ? extends U> function, Comparator<? super U> comparator)

Implements org.jooq.lambda.Collectable.minAll.

Get the minimum values by a function.

public <U extends Comparable<? super U>> Seq<T>
minAllBy(Function<? super T, ? extends U> function)

Implements org.jooq.lambda.Collectable.minAllBy.

Get the minimum values by a function.

public <U> Seq<T>
minAllBy(Function<? super T, ? extends U> function, Comparator<? super U> comparator)

Implements org.jooq.lambda.Collectable.minAllBy.

Get the minimum values by a function.

public <U extends Comparable<? super U>> Optional<T>
minBy(Function<? super T, ? extends U> function)

Implements org.jooq.lambda.Collectable.minBy.

Get the minimum value by a function.

public <U> Optional<T>
minBy(Function<? super T, ? extends U> function, Comparator<? super U> comparator)

Implements org.jooq.lambda.Collectable.minBy.

Get the minimum value by a function.

public Optional<T>
mode()

Implements org.jooq.lambda.Collectable.mode.

Get the mode, i.e. the value that appears most often in the collectable.

public Seq<T>
modeAll()

Implements org.jooq.lambda.Collectable.modeAll.

Get the mode, i.e. the values that appear most often in the collectable.

public <U> Seq<T>
modeAllBy(Function<? super T, ? extends U> function)

Implements org.jooq.lambda.Collectable.modeAllBy.

Get the mode, i.e. the values that appear most often in the collectable.

public <U> Optional<T>
modeBy(Function<? super T, ? extends U> function)

Implements org.jooq.lambda.Collectable.modeBy.

Get the mode, i.e. the value that appears most often in the collectable.

public boolean
noneMatch(Predicate<? super T> predicate)

Implements java.util.stream.Stream.noneMatch, org.jooq.lambda.Collectable.noneMatch.

Returns whether no elements of this stream match the provided predicate.

public Seq<T>
onClose(Runnable closeHandler)

Implements org.jooq.lambda.Seq.onClose.

Returns an equivalent stream with an additional close handler.

public Seq<T>
peek(Consumer<? super T> action)

Implements org.jooq.lambda.Seq.peek.

Returns a stream consisting of the elements of this stream, additionally performing the provided action on each element as elements are consumed from the resulting stream.

public Optional<T>
percentile(double percentile)

Implements org.jooq.lambda.Collectable.percentile.

Get the discrete percentile value.

public Optional<T>
percentile(double percentile, Comparator<? super T> comparator)

Implements org.jooq.lambda.Collectable.percentile.

Get the discrete percentile value.

public <U extends Comparable<? super U>> Optional<T>
percentileBy(double percentile, Function<? super T, ? extends U> function)

Implements org.jooq.lambda.Collectable.percentileBy.

Get the discrete percentile value by a function.

public <U> Optional<T>
percentileBy(double percentile, Function<? super T, ? extends U> function, Comparator<? super U> comparator)

Implements org.jooq.lambda.Collectable.percentileBy.

Get the discrete percentile value by a function.

public T
reduce(T identity, BinaryOperator<T> accumulator)

Implements java.util.stream.Stream.reduce.

Performs a reduction on the elements of this stream, using the provided identity value and an associative accumulation function, and returns the reduced value.

public Optional<T>
reduce(BinaryOperator<T> accumulator)

Implements java.util.stream.Stream.reduce.

Performs a reduction on the elements of this stream, using an associative accumulation function, and returns an Optional describing the reduced value, if any.

public <U> U
reduce(U identity, BiFunction<U, ? super T, U> accumulator, BinaryOperator<U> combiner)

Implements java.util.stream.Stream.reduce.

Performs a reduction on the elements of this stream, using the provided identity, accumulation and combining functions.

public Seq<T>
skip(long n)

Implements org.jooq.lambda.Seq.skip.

Returns a stream consisting of the remaining elements of this stream after discarding the first n elements of the stream.

public Seq<T>
sorted()

Implements org.jooq.lambda.Seq.sorted.

Returns a stream consisting of the elements of this stream, sorted according to natural order.

public Seq<T>
sorted(Comparator<? super T> comparator)

Implements org.jooq.lambda.Seq.sorted.

Returns a stream consisting of the elements of this stream, sorted according to the provided Comparator.

public Spliterator<T>
spliterator()

Overrides default org.jooq.lambda.Seq.spliterator.

Creates a Spliterator over the elements described by this Iterable.

public Stream<T>
stream()

Implements org.jooq.lambda.Seq.stream.

The underlying Stream implementation.

public Optional<T>
sum()

Implements org.jooq.lambda.Collectable.sum.

Get the sum of the elements in this collectable.

public <U> Optional<U>
sum(Function<? super T, ? extends U> function)

Implements org.jooq.lambda.Collectable.sum.

Get the sum of the elements in this collectable.

public double
sumDouble(ToDoubleFunction<? super T> function)

Implements org.jooq.lambda.Collectable.sumDouble.

Get the sum of the elements in this collectable as double.

public int
sumInt(ToIntFunction<? super T> function)

Implements org.jooq.lambda.Collectable.sumInt.

Get the sum of the elements in this collectable as int.

public long
sumLong(ToLongFunction<? super T> function)

Implements org.jooq.lambda.Collectable.sumLong.

Get the sum of the elements in this collectable as long.

public Object[]
toArray()

Implements java.util.stream.Stream.toArray.

Returns an array containing the elements of this stream.

public <A> A[]
toArray(IntFunction<A[]> generator)

Implements java.util.stream.Stream.toArray.

Returns an array containing the elements of this stream, using the provided generator function to allocate the returned array, as well as any additional arrays that might be required for a partitioned execution or for resizing.

public <C extends Collection<T>> C
toCollection(Supplier<C> factory)

Implements org.jooq.lambda.Collectable.toCollection.

Collect the collectable into a Collection.

public List<T>
toList()

Overrides default java.util.stream.Stream.toList.

Implements org.jooq.lambda.Collectable.toList.

Accumulates the elements of this stream into a List.

public <L extends List<T>> L
toList(Supplier<L> factory)

Implements org.jooq.lambda.Collectable.toList.

Collect the collectable into a List.

public <K, V> Map<K, V>
toMap(Function<? super T, ? extends K> keyMapper, Function<? super T, ? extends V> valueMapper)

Implements org.jooq.lambda.Collectable.toMap.

Collect the collectable into a Map.

public <K> Map<K, T>
toMap(Function<? super T, ? extends K> keyMapper)

Implements org.jooq.lambda.Collectable.toMap.

Collect the collectable into a Map with the given keys and the self element as value.

public Set<T>
toSet()

Implements org.jooq.lambda.Collectable.toSet.

Collect the collectable into a LinkedHashSet.

public <S extends Set<T>> S
toSet(Supplier<S> factory)

Implements org.jooq.lambda.Collectable.toSet.

Collect the collectable into a Set.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

public String
toString(CharSequence delimiter)

Implements org.jooq.lambda.Collectable.toString.

Consume a stream and concatenate all elements using a separator.

public String
public List<T>
toUnmodifiableList()

Implements org.jooq.lambda.Collectable.toUnmodifiableList.

Collect the collectable into an unmodifiable List.

public Set<T>
toUnmodifiableSet()

Implements org.jooq.lambda.Collectable.toUnmodifiableSet.

Collect the collectable into an unmodifiable Set.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait