java.lang.Object
org.jooq.lambda.SeqImpl<T>
- All Implemented Interfaces:
AutoCloseable
,Iterable<T>
,BaseStream<T,
,Stream<T>> Stream<T>
,Collectable<T>
,Seq<T>
-
Nested Class Summary
Nested classes/interfaces inherited from interface java.util.stream.Stream
Stream.Builder<T>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Whether all elements in the collectable match a given predicate.boolean
Whether any element in the collectable matches a given predicate.avg()
Get the average of the elements in this collectable.<U> Optional
<U> Get the average of the elements in this collectable.double
avgDouble
(ToDoubleFunction<? super T> function) Get the average of the elements in this collectable asdouble
.double
avgInt
(ToIntFunction<? super T> function) Get the average of the elements in this collectable asint
.double
avgLong
(ToLongFunction<? super T> function) Get the average of the elements in this collectable aslong
.bitAnd()
Collect all bits in this stream into a single value by applying bitwise and.<U> Optional
<U> Collect all bits in this stream into a single value by applying bitwise and.int
bitAndInt
(ToIntFunction<? super T> function) Collect all bits in this stream into a single value by applying bitwise and.long
bitAndLong
(ToLongFunction<? super T> function) Collect all bits in this stream into a single value by applying bitwise and.bitOr()
Collect all bits in this stream into a single value by applying bitwise or.<U> Optional
<U> Collect all bits in this stream into a single value by applying bitwise or.int
bitOrInt
(ToIntFunction<? super T> function) Collect all bits in this stream into a single value by applying bitwise or.long
bitOrLong
(ToLongFunction<? super T> function) Collect all bits in this stream into a single value by applying bitwise or.void
close()
<R> R
collect
(Supplier<R> supplier, BiConsumer<R, ? super T> accumulator, BiConsumer<R, R> combiner) <R,
A> R Collect this collectable.Get the common prefix of all strings (or to-stringed values) in this stream.Get the common prefix of all strings (or to-stringed values) in this stream.long
count()
Count the values in this collectable.long
Count the values in this collectable, for which a predicate evaluates to true.long
Count the distinct values in this collectable.long
countDistinct
(Predicate<? super T> predicate) Count the distinct values in this collectable, for which a predicate evaluates to true.<U> long
countDistinctBy
(Function<? super T, ? extends U> function) Count the distinct values of a given expression in this collectable.<U> long
countDistinctBy
(Function<? super T, ? extends U> function, Predicate<? super U> predicate) Count the distinct values of a given expression in this collectable, for which a predicate evaluates to true.distinct()
findAny()
<R> Seq
<R> flatMapToDouble
(Function<? super T, ? extends DoubleStream> mapper) flatMapToInt
(Function<? super T, ? extends IntStream> mapper) flatMapToLong
(Function<? super T, ? extends LongStream> mapper) void
void
forEachOrdered
(Consumer<? super T> action) format()
Generate a nicely formatted representation of this stream.boolean
Always returns false.iterator()
limit
(long maxSize) <R> Seq
<R> mapToDouble
(ToDoubleFunction<? super T> mapper) mapToInt
(ToIntFunction<? super T> mapper) mapToLong
(ToLongFunction<? super T> mapper) max()
Get the maximum value.max
(Comparator<? super T> comparator) Get the maximum value by a function.<U extends Comparable<? super U>>
Optional<U> Get the maximum value by a function.<U> Optional
<U> max
(Function<? super T, ? extends U> function, Comparator<? super U> comparator) Get the maximum value by a function.maxAll()
Get the maximum values.maxAll
(Comparator<? super T> comparator) Get the maximum values by a function.<U extends Comparable<? super U>>
Seq<U> Get the maximum values by a function.<U> Seq
<U> maxAll
(Function<? super T, ? extends U> function, Comparator<? super U> comparator) Get the maximum values by a function.<U extends Comparable<? super U>>
Seq<T> Get the maximum values by a function.maxAllBy
(Function<? super T, ? extends U> function, Comparator<? super U> comparator) Get the maximum values by a function.<U extends Comparable<? super U>>
Optional<T> Get the maximum value by a function.maxBy
(Function<? super T, ? extends U> function, Comparator<? super U> comparator) Get the maximum value by a function.median()
Get the median value.median
(Comparator<? super T> comparator) Get the median value.<U extends Comparable<? super U>>
Optional<T> Get the median value by a function.medianBy
(Function<? super T, ? extends U> function, Comparator<? super U> comparator) Get the median value by a function.min()
Get the minimum value.min
(Comparator<? super T> comparator) Get the minimum value by a function.<U extends Comparable<? super U>>
Optional<U> Get the minimum value by a function.<U> Optional
<U> min
(Function<? super T, ? extends U> function, Comparator<? super U> comparator) Get the minimum value by a function.minAll()
Get the minimum values.minAll
(Comparator<? super T> comparator) Get the minimum values by a function.<U extends Comparable<? super U>>
Seq<U> Get the minimum values by a function.<U> Seq
<U> minAll
(Function<? super T, ? extends U> function, Comparator<? super U> comparator) Get the minimum values by a function.<U extends Comparable<? super U>>
Seq<T> Get the minimum values by a function.minAllBy
(Function<? super T, ? extends U> function, Comparator<? super U> comparator) Get the minimum values by a function.<U extends Comparable<? super U>>
Optional<T> Get the minimum value by a function.minBy
(Function<? super T, ? extends U> function, Comparator<? super U> comparator) Get the minimum value by a function.mode()
Get the mode, i.e.modeAll()
Get the mode, i.e.Get the mode, i.e.Get the mode, i.e.boolean
Whether no element in the collectable matches a given predicate.percentile
(double percentile) Get the discrete percentile value.percentile
(double percentile, Comparator<? super T> comparator) Get the discrete percentile value.<U extends Comparable<? super U>>
Optional<T> percentileBy
(double percentile, Function<? super T, ? extends U> function) Get the discrete percentile value by a function.percentileBy
(double percentile, Function<? super T, ? extends U> function, Comparator<? super U> comparator) Get the discrete percentile value by a function.reduce
(BinaryOperator<T> accumulator) reduce
(T identity, BinaryOperator<T> accumulator) <U> U
reduce
(U identity, BiFunction<U, ? super T, U> accumulator, BinaryOperator<U> combiner) skip
(long n) sorted()
sorted
(Comparator<? super T> comparator) stream()
The underlyingStream
implementation.sum()
Get the sum of the elements in this collectable.<U> Optional
<U> Get the sum of the elements in this collectable.double
sumDouble
(ToDoubleFunction<? super T> function) Get the sum of the elements in this collectable asdouble
.int
sumInt
(ToIntFunction<? super T> function) Get the sum of the elements in this collectable asint
.long
sumLong
(ToLongFunction<? super T> function) Get the sum of the elements in this collectable aslong
.Object[]
toArray()
<A> A[]
toArray
(IntFunction<A[]> generator) <C extends Collection<T>>
CtoCollection
(Supplier<C> factory) Collect the collectable into aCollection
.toList()
Collect the collectable into anArrayList
.Collect the collectable into aList
.Collect the collectable into aMap
with the given keys and the self element as value.<K,
V> Map <K, V> Collect the collectable into aMap
.toSet()
Collect the collectable into aLinkedHashSet
.Collect the collectable into aSet
.toString()
toString
(CharSequence delimiter) Consume a stream and concatenate all elements using a separator.toString
(CharSequence delimiter, CharSequence prefix, CharSequence suffix) Shortcut for callingStream.collect(Collector)
with aCollectors.joining(CharSequence, CharSequence, CharSequence)
collector.Collect the collectable into an unmodifiableList
.Collect the collectable into an unmodifiableSet
.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.jooq.lambda.Collectable
collect, collect, collect, collect, collect, collect, collect, collect, collect, collect, collect, collect, collect, collect, collect
Methods inherited from interface org.jooq.lambda.Seq
append, append, append, append, append, append, cast, concat, concat, concat, concat, concat, concat, contains, containsAll, containsAll, containsAll, containsAll, containsAny, containsAny, containsAny, containsAny, crossApply, crossJoin, crossJoin, crossJoin, crossSelfJoin, cycle, cycle, distinct, drop, duplicate, findFirst, findLast, findLast, findSingle, foldLeft, foldRight, get, groupBy, groupBy, groupBy, grouped, grouped, indexOf, indexOf, innerJoin, innerJoin, innerJoin, innerSelfJoin, intersperse, isEmpty, isNotEmpty, join, join, join, leftOuterJoin, leftOuterJoin, leftOuterJoin, leftOuterSelfJoin, limitUntil, limitUntilClosed, limitWhile, limitWhileClosed, ofType, onEmpty, onEmptyGet, onEmptyThrow, outerApply, parallel, partition, prepend, prepend, prepend, prepend, prepend, prepend, print, print, printErr, printOut, remove, removeAll, removeAll, removeAll, removeAll, retainAll, retainAll, retainAll, retainAll, reverse, rightOuterJoin, rightOuterJoin, rightOuterJoin, rightOuterSelfJoin, scanLeft, scanRight, sequential, shuffle, shuffle, skipUntil, skipUntilClosed, skipWhile, skipWhileClosed, slice, sliding, sorted, sorted, splitAt, splitAtHead, take, transform, unordered, window, window, window, window, window, window, window, window, window, window, window, window, window, window, window, window, window, window, window, window, window, window, window, window, zip, zip, zip, zip, zip, zip, zipWithIndex, zipWithIndex
Methods inherited from interface java.util.stream.Stream
dropWhile, mapMulti, mapMultiToDouble, mapMultiToInt, mapMultiToLong, takeWhile
-
Field Details
-
NULL
-
stream
-
buffered
-
-
Constructor Details
-
SeqImpl
-
-
Method Details
-
stream
Description copied from interface:Seq
The underlyingStream
implementation. -
filter
-
map
-
mapToInt
-
mapToLong
-
mapToDouble
- Specified by:
mapToDouble
in interfaceSeq<T>
- Specified by:
mapToDouble
in interfaceStream<T>
-
flatMap
-
flatMapToInt
- Specified by:
flatMapToInt
in interfaceSeq<T>
- Specified by:
flatMapToInt
in interfaceStream<T>
-
flatMapToLong
- Specified by:
flatMapToLong
in interfaceSeq<T>
- Specified by:
flatMapToLong
in interfaceStream<T>
-
flatMapToDouble
- Specified by:
flatMapToDouble
in interfaceSeq<T>
- Specified by:
flatMapToDouble
in interfaceStream<T>
-
distinct
-
sorted
-
sorted
-
peek
-
limit
-
skip
-
forEach
-
forEachOrdered
- Specified by:
forEachOrdered
in interfaceStream<T>
-
toArray
-
toArray
-
reduce
-
reduce
-
reduce
-
collect
public <R> R collect(Supplier<R> supplier, BiConsumer<R, ? super T> accumulator, BiConsumer<R, R> combiner) -
collect
Description copied from interface:Collectable
Collect this collectable. -
count
public long count()Description copied from interface:Collectable
Count the values in this collectable. -
count
Description copied from interface:Collectable
Count the values in this collectable, for which a predicate evaluates to true.- Specified by:
count
in interfaceCollectable<T>
-
countDistinct
public long countDistinct()Description copied from interface:Collectable
Count the distinct values in this collectable.- Specified by:
countDistinct
in interfaceCollectable<T>
-
countDistinct
Description copied from interface:Collectable
Count the distinct values in this collectable, for which a predicate evaluates to true.- Specified by:
countDistinct
in interfaceCollectable<T>
-
countDistinctBy
Description copied from interface:Collectable
Count the distinct values of a given expression in this collectable.- Specified by:
countDistinctBy
in interfaceCollectable<T>
-
countDistinctBy
public <U> long countDistinctBy(Function<? super T, ? extends U> function, Predicate<? super U> predicate) Description copied from interface:Collectable
Count the distinct values of a given expression in this collectable, for which a predicate evaluates to true.- Specified by:
countDistinctBy
in interfaceCollectable<T>
-
sum
Description copied from interface:Collectable
Get the sum of the elements in this collectable.- Specified by:
sum
in interfaceCollectable<T>
-
sum
Description copied from interface:Collectable
Get the sum of the elements in this collectable.- Specified by:
sum
in interfaceCollectable<T>
-
sumInt
Description copied from interface:Collectable
Get the sum of the elements in this collectable asint
.- Specified by:
sumInt
in interfaceCollectable<T>
-
sumLong
Description copied from interface:Collectable
Get the sum of the elements in this collectable aslong
.- Specified by:
sumLong
in interfaceCollectable<T>
-
sumDouble
Description copied from interface:Collectable
Get the sum of the elements in this collectable asdouble
.- Specified by:
sumDouble
in interfaceCollectable<T>
-
avg
Description copied from interface:Collectable
Get the average of the elements in this collectable.- Specified by:
avg
in interfaceCollectable<T>
-
avg
Description copied from interface:Collectable
Get the average of the elements in this collectable.- Specified by:
avg
in interfaceCollectable<T>
-
avgInt
Description copied from interface:Collectable
Get the average of the elements in this collectable asint
.- Specified by:
avgInt
in interfaceCollectable<T>
-
avgLong
Description copied from interface:Collectable
Get the average of the elements in this collectable aslong
.- Specified by:
avgLong
in interfaceCollectable<T>
-
avgDouble
Description copied from interface:Collectable
Get the average of the elements in this collectable asdouble
.- Specified by:
avgDouble
in interfaceCollectable<T>
-
min
Description copied from interface:Collectable
Get the minimum value.This makes the unsafe assumption that
<T extends Comparable<? super T>>
- Specified by:
min
in interfaceCollectable<T>
-
min
Description copied from interface:Collectable
Get the minimum value by a function. -
min
Description copied from interface:Collectable
Get the minimum value by a function.- Specified by:
min
in interfaceCollectable<T>
-
min
public <U> Optional<U> min(Function<? super T, ? extends U> function, Comparator<? super U> comparator) Description copied from interface:Collectable
Get the minimum value by a function.- Specified by:
min
in interfaceCollectable<T>
-
minBy
public <U extends Comparable<? super U>> Optional<T> minBy(Function<? super T, ? extends U> function) Description copied from interface:Collectable
Get the minimum value by a function.- Specified by:
minBy
in interfaceCollectable<T>
-
minBy
public <U> Optional<T> minBy(Function<? super T, ? extends U> function, Comparator<? super U> comparator) Description copied from interface:Collectable
Get the minimum value by a function.- Specified by:
minBy
in interfaceCollectable<T>
-
minAll
Description copied from interface:Collectable
Get the minimum values.This makes the unsafe assumption that
<T extends Comparable<? super T>>
- Specified by:
minAll
in interfaceCollectable<T>
-
minAll
Description copied from interface:Collectable
Get the minimum values by a function.- Specified by:
minAll
in interfaceCollectable<T>
-
minAll
Description copied from interface:Collectable
Get the minimum values by a function.- Specified by:
minAll
in interfaceCollectable<T>
-
minAll
public <U> Seq<U> minAll(Function<? super T, ? extends U> function, Comparator<? super U> comparator) Description copied from interface:Collectable
Get the minimum values by a function.- Specified by:
minAll
in interfaceCollectable<T>
-
minAllBy
Description copied from interface:Collectable
Get the minimum values by a function.- Specified by:
minAllBy
in interfaceCollectable<T>
-
minAllBy
public <U> Seq<T> minAllBy(Function<? super T, ? extends U> function, Comparator<? super U> comparator) Description copied from interface:Collectable
Get the minimum values by a function.- Specified by:
minAllBy
in interfaceCollectable<T>
-
max
Description copied from interface:Collectable
Get the maximum value.This makes the unsafe assumption that
<T extends Comparable<? super T>>
- Specified by:
max
in interfaceCollectable<T>
-
max
Description copied from interface:Collectable
Get the maximum value by a function. -
max
Description copied from interface:Collectable
Get the maximum value by a function.- Specified by:
max
in interfaceCollectable<T>
-
max
public <U> Optional<U> max(Function<? super T, ? extends U> function, Comparator<? super U> comparator) Description copied from interface:Collectable
Get the maximum value by a function.- Specified by:
max
in interfaceCollectable<T>
-
maxBy
public <U extends Comparable<? super U>> Optional<T> maxBy(Function<? super T, ? extends U> function) Description copied from interface:Collectable
Get the maximum value by a function.- Specified by:
maxBy
in interfaceCollectable<T>
-
maxBy
public <U> Optional<T> maxBy(Function<? super T, ? extends U> function, Comparator<? super U> comparator) Description copied from interface:Collectable
Get the maximum value by a function.- Specified by:
maxBy
in interfaceCollectable<T>
-
maxAll
Description copied from interface:Collectable
Get the maximum values.This makes the unsafe assumption that
<T extends Comparable<? super T>>
- Specified by:
maxAll
in interfaceCollectable<T>
-
maxAll
Description copied from interface:Collectable
Get the maximum values by a function.- Specified by:
maxAll
in interfaceCollectable<T>
-
maxAll
Description copied from interface:Collectable
Get the maximum values by a function.- Specified by:
maxAll
in interfaceCollectable<T>
-
maxAll
public <U> Seq<U> maxAll(Function<? super T, ? extends U> function, Comparator<? super U> comparator) Description copied from interface:Collectable
Get the maximum values by a function.- Specified by:
maxAll
in interfaceCollectable<T>
-
maxAllBy
Description copied from interface:Collectable
Get the maximum values by a function.- Specified by:
maxAllBy
in interfaceCollectable<T>
-
maxAllBy
public <U> Seq<T> maxAllBy(Function<? super T, ? extends U> function, Comparator<? super U> comparator) Description copied from interface:Collectable
Get the maximum values by a function.- Specified by:
maxAllBy
in interfaceCollectable<T>
-
median
Description copied from interface:Collectable
Get the median value.This makes the unsafe assumption that
<T extends Comparable<? super T>>
- Specified by:
median
in interfaceCollectable<T>
-
median
Description copied from interface:Collectable
Get the median value.- Specified by:
median
in interfaceCollectable<T>
-
medianBy
public <U extends Comparable<? super U>> Optional<T> medianBy(Function<? super T, ? extends U> function) Description copied from interface:Collectable
Get the median value by a function.- Specified by:
medianBy
in interfaceCollectable<T>
-
medianBy
public <U> Optional<T> medianBy(Function<? super T, ? extends U> function, Comparator<? super U> comparator) Description copied from interface:Collectable
Get the median value by a function.- Specified by:
medianBy
in interfaceCollectable<T>
-
percentile
Description copied from interface:Collectable
Get the discrete percentile value.This makes the unsafe assumption that
<T extends Comparable<? super T>>
- Specified by:
percentile
in interfaceCollectable<T>
-
percentile
Description copied from interface:Collectable
Get the discrete percentile value.- Specified by:
percentile
in interfaceCollectable<T>
-
percentileBy
public <U extends Comparable<? super U>> Optional<T> percentileBy(double percentile, Function<? super T, ? extends U> function) Description copied from interface:Collectable
Get the discrete percentile value by a function.- Specified by:
percentileBy
in interfaceCollectable<T>
-
percentileBy
public <U> Optional<T> percentileBy(double percentile, Function<? super T, ? extends U> function, Comparator<? super U> comparator) Description copied from interface:Collectable
Get the discrete percentile value by a function.- Specified by:
percentileBy
in interfaceCollectable<T>
-
mode
Description copied from interface:Collectable
Get the mode, i.e. the value that appears most often in the collectable.- Specified by:
mode
in interfaceCollectable<T>
-
modeBy
Description copied from interface:Collectable
Get the mode, i.e. the value that appears most often in the collectable.- Specified by:
modeBy
in interfaceCollectable<T>
-
modeAll
Description copied from interface:Collectable
Get the mode, i.e. the values that appear most often in the collectable.- Specified by:
modeAll
in interfaceCollectable<T>
-
modeAllBy
Description copied from interface:Collectable
Get the mode, i.e. the values that appear most often in the collectable.- Specified by:
modeAllBy
in interfaceCollectable<T>
-
anyMatch
Description copied from interface:Collectable
Whether any element in the collectable matches a given predicate. -
allMatch
Description copied from interface:Collectable
Whether all elements in the collectable match a given predicate. -
noneMatch
Description copied from interface:Collectable
Whether no element in the collectable matches a given predicate. -
bitAnd
Description copied from interface:Collectable
Collect all bits in this stream into a single value by applying bitwise and.- Specified by:
bitAnd
in interfaceCollectable<T>
-
bitAnd
Description copied from interface:Collectable
Collect all bits in this stream into a single value by applying bitwise and.- Specified by:
bitAnd
in interfaceCollectable<T>
-
bitAndInt
Description copied from interface:Collectable
Collect all bits in this stream into a single value by applying bitwise and.- Specified by:
bitAndInt
in interfaceCollectable<T>
-
bitAndLong
Description copied from interface:Collectable
Collect all bits in this stream into a single value by applying bitwise and.- Specified by:
bitAndLong
in interfaceCollectable<T>
-
bitOr
Description copied from interface:Collectable
Collect all bits in this stream into a single value by applying bitwise or.- Specified by:
bitOr
in interfaceCollectable<T>
-
bitOr
Description copied from interface:Collectable
Collect all bits in this stream into a single value by applying bitwise or.- Specified by:
bitOr
in interfaceCollectable<T>
-
bitOrInt
Description copied from interface:Collectable
Collect all bits in this stream into a single value by applying bitwise or.- Specified by:
bitOrInt
in interfaceCollectable<T>
-
bitOrLong
Description copied from interface:Collectable
Collect all bits in this stream into a single value by applying bitwise or.- Specified by:
bitOrLong
in interfaceCollectable<T>
-
findFirst
-
findAny
-
iterator
-
spliterator
- Specified by:
spliterator
in interfaceBaseStream<T,
Stream<T>> - Specified by:
spliterator
in interfaceIterable<T>
- Specified by:
spliterator
in interfaceSeq<T>
-
isParallel
public boolean isParallel()Always returns false. Seq streams are always sequential and, as such, doesn't support parallelization.- Specified by:
isParallel
in interfaceBaseStream<T,
Stream<T>> - Returns:
- false
- See Also:
-
onClose
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceBaseStream<T,
Stream<T>> - Specified by:
close
in interfaceSeq<T>
-
toList
Description copied from interface:Collectable
Collect the collectable into anArrayList
. -
toList
Description copied from interface:Collectable
Collect the collectable into aList
.- Specified by:
toList
in interfaceCollectable<T>
-
toUnmodifiableList
Description copied from interface:Collectable
Collect the collectable into an unmodifiableList
.- Specified by:
toUnmodifiableList
in interfaceCollectable<T>
-
toSet
Description copied from interface:Collectable
Collect the collectable into aLinkedHashSet
.- Specified by:
toSet
in interfaceCollectable<T>
-
toSet
Description copied from interface:Collectable
Collect the collectable into aSet
.- Specified by:
toSet
in interfaceCollectable<T>
-
toUnmodifiableSet
Description copied from interface:Collectable
Collect the collectable into an unmodifiableSet
.- Specified by:
toUnmodifiableSet
in interfaceCollectable<T>
-
toCollection
Description copied from interface:Collectable
Collect the collectable into aCollection
.- Specified by:
toCollection
in interfaceCollectable<T>
-
toMap
public <K,V> Map<K,V> toMap(Function<? super T, ? extends K> keyMapper, Function<? super T, ? extends V> valueMapper) Description copied from interface:Collectable
Collect the collectable into aMap
.- Specified by:
toMap
in interfaceCollectable<T>
-
toMap
Description copied from interface:Collectable
Collect the collectable into aMap
with the given keys and the self element as value.- Specified by:
toMap
in interfaceCollectable<T>
-
toString
-
toString
Description copied from interface:Collectable
Consume a stream and concatenate all elements using a separator.- Specified by:
toString
in interfaceCollectable<T>
-
toString
Description copied from interface:Collectable
Shortcut for callingStream.collect(Collector)
with aCollectors.joining(CharSequence, CharSequence, CharSequence)
collector.- Specified by:
toString
in interfaceCollectable<T>
-
commonPrefix
Description copied from interface:Collectable
Get the common prefix of all strings (or to-stringed values) in this stream.- Specified by:
commonPrefix
in interfaceCollectable<T>
-
commonSuffix
Description copied from interface:Collectable
Get the common prefix of all strings (or to-stringed values) in this stream.- Specified by:
commonSuffix
in interfaceCollectable<T>
-
format
Description copied from interface:Seq
Generate a nicely formatted representation of this stream.Clients should not rely on the concrete formatting of this method, which is intended for debugging convenience only.
-