Class SeqImpl<T>
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 Stream
Stream.Builder<T> -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanWhether all elements in the collectable match a given predicate.booleanWhether 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.doubleavgDouble(ToDoubleFunction<? super T> function) Get the average of the elements in this collectable asdouble.doubleavgInt(ToIntFunction<? super T> function) Get the average of the elements in this collectable asint.doubleavgLong(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.intbitAndInt(ToIntFunction<? super T> function) Collect all bits in this stream into a single value by applying bitwise and.longbitAndLong(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.intbitOrInt(ToIntFunction<? super T> function) Collect all bits in this stream into a single value by applying bitwise or.longbitOrLong(ToLongFunction<? super T> function) Collect all bits in this stream into a single value by applying bitwise or.voidclose()<R> Rcollect(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.longcount()Count the values in this collectable.longCount the values in this collectable, for which a predicate evaluates to true.longCount the distinct values in this collectable.longcountDistinct(Predicate<? super T> predicate) Count the distinct values in this collectable, for which a predicate evaluates to true.<U> longcountDistinctBy(Function<? super T, ? extends U> function) Count the distinct values of a given expression in this collectable.<U> longcountDistinctBy(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) voidvoidforEachOrdered(Consumer<? super T> action) format()Generate a nicely formatted representation of this stream.booleanAlways 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.booleanWhether 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> Ureduce(U identity, BiFunction<U, ? super T, U> accumulator, BinaryOperator<U> combiner) skip(long n) sorted()sorted(Comparator<? super T> comparator) stream()The underlyingStreamimplementation.sum()Get the sum of the elements in this collectable.<U> Optional<U> Get the sum of the elements in this collectable.doublesumDouble(ToDoubleFunction<? super T> function) Get the sum of the elements in this collectable asdouble.intsumInt(ToIntFunction<? super T> function) Get the sum of the elements in this collectable asint.longsumLong(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 aMapwith 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 Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Collectable
collect, collect, collect, collect, collect, collect, collect, collect, collect, collect, collect, collect, collect, collect, collectMethods inherited from interface 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, zipWithIndexMethods inherited from interface Stream
dropWhile, gather, mapMulti, mapMultiToDouble, mapMultiToInt, mapMultiToLong, takeWhile
-
Field Details
-
NULL
-
stream
-
buffered
-
-
Constructor Details
-
SeqImpl
-
-
Method Details
-
stream
-
filter
-
map
-
mapToInt
-
mapToLong
-
mapToDouble
- Specified by:
mapToDoublein interfaceSeq<T>- Specified by:
mapToDoublein interfaceStream<T>
-
flatMap
-
flatMapToInt
- Specified by:
flatMapToIntin interfaceSeq<T>- Specified by:
flatMapToIntin interfaceStream<T>
-
flatMapToLong
- Specified by:
flatMapToLongin interfaceSeq<T>- Specified by:
flatMapToLongin interfaceStream<T>
-
flatMapToDouble
- Specified by:
flatMapToDoublein interfaceSeq<T>- Specified by:
flatMapToDoublein interfaceStream<T>
-
distinct
-
sorted
-
sorted
-
peek
-
limit
-
skip
-
forEach
-
forEachOrdered
- Specified by:
forEachOrderedin interfaceStream<T>
-
toArray
-
toArray
-
reduce
-
reduce
-
reduce
public <U> U reduce(U identity, BiFunction<U, ? super T, U> accumulator, BinaryOperator<U> combiner) -
collect
public <R> R collect(Supplier<R> supplier, BiConsumer<R, ? super T> accumulator, BiConsumer<R, R> combiner) -
collect
Description copied from interface:CollectableCollect this collectable. -
count
public long count()Description copied from interface:CollectableCount the values in this collectable. -
count
Description copied from interface:CollectableCount the values in this collectable, for which a predicate evaluates to true.- Specified by:
countin interfaceCollectable<T>
-
countDistinct
public long countDistinct()Description copied from interface:CollectableCount the distinct values in this collectable.- Specified by:
countDistinctin interfaceCollectable<T>
-
countDistinct
Description copied from interface:CollectableCount the distinct values in this collectable, for which a predicate evaluates to true.- Specified by:
countDistinctin interfaceCollectable<T>
-
countDistinctBy
Description copied from interface:CollectableCount the distinct values of a given expression in this collectable.- Specified by:
countDistinctByin interfaceCollectable<T>
-
countDistinctBy
public <U> long countDistinctBy(Function<? super T, ? extends U> function, Predicate<? super U> predicate) Description copied from interface:CollectableCount the distinct values of a given expression in this collectable, for which a predicate evaluates to true.- Specified by:
countDistinctByin interfaceCollectable<T>
-
sum
Description copied from interface:CollectableGet the sum of the elements in this collectable.- Specified by:
sumin interfaceCollectable<T>
-
sum
Description copied from interface:CollectableGet the sum of the elements in this collectable.- Specified by:
sumin interfaceCollectable<T>
-
sumInt
Description copied from interface:CollectableGet the sum of the elements in this collectable asint.- Specified by:
sumIntin interfaceCollectable<T>
-
sumLong
Description copied from interface:CollectableGet the sum of the elements in this collectable aslong.- Specified by:
sumLongin interfaceCollectable<T>
-
sumDouble
Description copied from interface:CollectableGet the sum of the elements in this collectable asdouble.- Specified by:
sumDoublein interfaceCollectable<T>
-
avg
Description copied from interface:CollectableGet the average of the elements in this collectable.- Specified by:
avgin interfaceCollectable<T>
-
avg
Description copied from interface:CollectableGet the average of the elements in this collectable.- Specified by:
avgin interfaceCollectable<T>
-
avgInt
Description copied from interface:CollectableGet the average of the elements in this collectable asint.- Specified by:
avgIntin interfaceCollectable<T>
-
avgLong
Description copied from interface:CollectableGet the average of the elements in this collectable aslong.- Specified by:
avgLongin interfaceCollectable<T>
-
avgDouble
Description copied from interface:CollectableGet the average of the elements in this collectable asdouble.- Specified by:
avgDoublein interfaceCollectable<T>
-
min
Description copied from interface:CollectableGet the minimum value.This makes the unsafe assumption that
<T extends Comparable<? super T>>- Specified by:
minin interfaceCollectable<T>
-
min
Description copied from interface:CollectableGet the minimum value by a function. -
min
Description copied from interface:CollectableGet the minimum value by a function.- Specified by:
minin interfaceCollectable<T>
-
min
public <U> Optional<U> min(Function<? super T, ? extends U> function, Comparator<? super U> comparator) Description copied from interface:CollectableGet the minimum value by a function.- Specified by:
minin interfaceCollectable<T>
-
minBy
public <U extends Comparable<? super U>> Optional<T> minBy(Function<? super T, ? extends U> function) Description copied from interface:CollectableGet the minimum value by a function.- Specified by:
minByin interfaceCollectable<T>
-
minBy
public <U> Optional<T> minBy(Function<? super T, ? extends U> function, Comparator<? super U> comparator) Description copied from interface:CollectableGet the minimum value by a function.- Specified by:
minByin interfaceCollectable<T>
-
minAll
Description copied from interface:CollectableGet the minimum values.This makes the unsafe assumption that
<T extends Comparable<? super T>>- Specified by:
minAllin interfaceCollectable<T>
-
minAll
Description copied from interface:CollectableGet the minimum values by a function.- Specified by:
minAllin interfaceCollectable<T>
-
minAll
Description copied from interface:CollectableGet the minimum values by a function.- Specified by:
minAllin interfaceCollectable<T>
-
minAll
public <U> Seq<U> minAll(Function<? super T, ? extends U> function, Comparator<? super U> comparator) Description copied from interface:CollectableGet the minimum values by a function.- Specified by:
minAllin interfaceCollectable<T>
-
minAllBy
Description copied from interface:CollectableGet the minimum values by a function.- Specified by:
minAllByin interfaceCollectable<T>
-
minAllBy
public <U> Seq<T> minAllBy(Function<? super T, ? extends U> function, Comparator<? super U> comparator) Description copied from interface:CollectableGet the minimum values by a function.- Specified by:
minAllByin interfaceCollectable<T>
-
max
Description copied from interface:CollectableGet the maximum value.This makes the unsafe assumption that
<T extends Comparable<? super T>>- Specified by:
maxin interfaceCollectable<T>
-
max
Description copied from interface:CollectableGet the maximum value by a function. -
max
Description copied from interface:CollectableGet the maximum value by a function.- Specified by:
maxin interfaceCollectable<T>
-
max
public <U> Optional<U> max(Function<? super T, ? extends U> function, Comparator<? super U> comparator) Description copied from interface:CollectableGet the maximum value by a function.- Specified by:
maxin interfaceCollectable<T>
-
maxBy
public <U extends Comparable<? super U>> Optional<T> maxBy(Function<? super T, ? extends U> function) Description copied from interface:CollectableGet the maximum value by a function.- Specified by:
maxByin interfaceCollectable<T>
-
maxBy
public <U> Optional<T> maxBy(Function<? super T, ? extends U> function, Comparator<? super U> comparator) Description copied from interface:CollectableGet the maximum value by a function.- Specified by:
maxByin interfaceCollectable<T>
-
maxAll
Description copied from interface:CollectableGet the maximum values.This makes the unsafe assumption that
<T extends Comparable<? super T>>- Specified by:
maxAllin interfaceCollectable<T>
-
maxAll
Description copied from interface:CollectableGet the maximum values by a function.- Specified by:
maxAllin interfaceCollectable<T>
-
maxAll
Description copied from interface:CollectableGet the maximum values by a function.- Specified by:
maxAllin interfaceCollectable<T>
-
maxAll
public <U> Seq<U> maxAll(Function<? super T, ? extends U> function, Comparator<? super U> comparator) Description copied from interface:CollectableGet the maximum values by a function.- Specified by:
maxAllin interfaceCollectable<T>
-
maxAllBy
Description copied from interface:CollectableGet the maximum values by a function.- Specified by:
maxAllByin interfaceCollectable<T>
-
maxAllBy
public <U> Seq<T> maxAllBy(Function<? super T, ? extends U> function, Comparator<? super U> comparator) Description copied from interface:CollectableGet the maximum values by a function.- Specified by:
maxAllByin interfaceCollectable<T>
-
median
Description copied from interface:CollectableGet the median value.This makes the unsafe assumption that
<T extends Comparable<? super T>>- Specified by:
medianin interfaceCollectable<T>
-
median
Description copied from interface:CollectableGet the median value.- Specified by:
medianin interfaceCollectable<T>
-
medianBy
public <U extends Comparable<? super U>> Optional<T> medianBy(Function<? super T, ? extends U> function) Description copied from interface:CollectableGet the median value by a function.- Specified by:
medianByin interfaceCollectable<T>
-
medianBy
public <U> Optional<T> medianBy(Function<? super T, ? extends U> function, Comparator<? super U> comparator) Description copied from interface:CollectableGet the median value by a function.- Specified by:
medianByin interfaceCollectable<T>
-
percentile
Description copied from interface:CollectableGet the discrete percentile value.This makes the unsafe assumption that
<T extends Comparable<? super T>>- Specified by:
percentilein interfaceCollectable<T>
-
percentile
Description copied from interface:CollectableGet the discrete percentile value.- Specified by:
percentilein interfaceCollectable<T>
-
percentileBy
public <U extends Comparable<? super U>> Optional<T> percentileBy(double percentile, Function<? super T, ? extends U> function) Description copied from interface:CollectableGet the discrete percentile value by a function.- Specified by:
percentileByin interfaceCollectable<T>
-
percentileBy
public <U> Optional<T> percentileBy(double percentile, Function<? super T, ? extends U> function, Comparator<? super U> comparator) Description copied from interface:CollectableGet the discrete percentile value by a function.- Specified by:
percentileByin interfaceCollectable<T>
-
mode
Description copied from interface:CollectableGet the mode, i.e. the value that appears most often in the collectable.- Specified by:
modein interfaceCollectable<T>
-
modeBy
Description copied from interface:CollectableGet the mode, i.e. the value that appears most often in the collectable.- Specified by:
modeByin interfaceCollectable<T>
-
modeAll
Description copied from interface:CollectableGet the mode, i.e. the values that appear most often in the collectable.- Specified by:
modeAllin interfaceCollectable<T>
-
modeAllBy
Description copied from interface:CollectableGet the mode, i.e. the values that appear most often in the collectable.- Specified by:
modeAllByin interfaceCollectable<T>
-
anyMatch
Description copied from interface:CollectableWhether any element in the collectable matches a given predicate. -
allMatch
Description copied from interface:CollectableWhether all elements in the collectable match a given predicate. -
noneMatch
Description copied from interface:CollectableWhether no element in the collectable matches a given predicate. -
bitAnd
Description copied from interface:CollectableCollect all bits in this stream into a single value by applying bitwise and.- Specified by:
bitAndin interfaceCollectable<T>
-
bitAnd
Description copied from interface:CollectableCollect all bits in this stream into a single value by applying bitwise and.- Specified by:
bitAndin interfaceCollectable<T>
-
bitAndInt
Description copied from interface:CollectableCollect all bits in this stream into a single value by applying bitwise and.- Specified by:
bitAndIntin interfaceCollectable<T>
-
bitAndLong
Description copied from interface:CollectableCollect all bits in this stream into a single value by applying bitwise and.- Specified by:
bitAndLongin interfaceCollectable<T>
-
bitOr
Description copied from interface:CollectableCollect all bits in this stream into a single value by applying bitwise or.- Specified by:
bitOrin interfaceCollectable<T>
-
bitOr
Description copied from interface:CollectableCollect all bits in this stream into a single value by applying bitwise or.- Specified by:
bitOrin interfaceCollectable<T>
-
bitOrInt
Description copied from interface:CollectableCollect all bits in this stream into a single value by applying bitwise or.- Specified by:
bitOrIntin interfaceCollectable<T>
-
bitOrLong
Description copied from interface:CollectableCollect all bits in this stream into a single value by applying bitwise or.- Specified by:
bitOrLongin interfaceCollectable<T>
-
findFirst
-
findAny
-
iterator
-
spliterator
- Specified by:
spliteratorin interfaceBaseStream<T, Stream<T>>- Specified by:
spliteratorin interfaceIterable<T>- Specified by:
spliteratorin interfaceSeq<T>
-
isParallel
public boolean isParallel()Always returns false. Seq streams are always sequential and, as such, doesn't support parallelization.- Specified by:
isParallelin interfaceBaseStream<T, Stream<T>>- Returns:
- false
- See Also:
-
onClose
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceBaseStream<T, Stream<T>>- Specified by:
closein interfaceSeq<T>
-
toList
Description copied from interface:CollectableCollect the collectable into anArrayList. -
toList
Description copied from interface:CollectableCollect the collectable into aList.- Specified by:
toListin interfaceCollectable<T>
-
toUnmodifiableList
Description copied from interface:CollectableCollect the collectable into an unmodifiableList.- Specified by:
toUnmodifiableListin interfaceCollectable<T>
-
toSet
Description copied from interface:CollectableCollect the collectable into aLinkedHashSet.- Specified by:
toSetin interfaceCollectable<T>
-
toSet
Description copied from interface:CollectableCollect the collectable into aSet.- Specified by:
toSetin interfaceCollectable<T>
-
toUnmodifiableSet
Description copied from interface:CollectableCollect the collectable into an unmodifiableSet.- Specified by:
toUnmodifiableSetin interfaceCollectable<T>
-
toCollection
Description copied from interface:CollectableCollect the collectable into aCollection.- Specified by:
toCollectionin 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:CollectableCollect the collectable into aMap.- Specified by:
toMapin interfaceCollectable<T>
-
toMap
Description copied from interface:CollectableCollect the collectable into aMapwith the given keys and the self element as value.- Specified by:
toMapin interfaceCollectable<T>
-
toString
-
toString
Description copied from interface:CollectableConsume a stream and concatenate all elements using a separator.- Specified by:
toStringin interfaceCollectable<T>
-
toString
Description copied from interface:CollectableShortcut for callingStream.collect(Collector)with aCollectors.joining(CharSequence, CharSequence, CharSequence)collector.- Specified by:
toStringin interfaceCollectable<T>
-
commonPrefix
Description copied from interface:CollectableGet the common prefix of all strings (or to-stringed values) in this stream.- Specified by:
commonPrefixin interfaceCollectable<T>
-
commonSuffix
Description copied from interface:CollectableGet the common prefix of all strings (or to-stringed values) in this stream.- Specified by:
commonSuffixin interfaceCollectable<T>
-
format
-