| Modifier and Type | Method and Description |
|---|---|
StreamEx<T> |
StreamEx.append(Collection<? extends T> collection)
Returns a new
StreamEx which is a concatenation of this stream
and the stream created from supplied collection. |
StreamEx<T> |
StreamEx.append(T... values)
Returns a new
StreamEx which is a concatenation of this stream
and the supplied values. |
StreamEx<T> |
StreamEx.append(T value)
Returns a new
StreamEx which is a concatenation of this stream
and the supplied value. |
StreamEx<Double> |
DoubleStreamEx.boxed() |
StreamEx<Integer> |
IntStreamEx.boxed() |
StreamEx<Long> |
LongStreamEx.boxed() |
static <T> StreamEx<List<T>> |
StreamEx.cartesianPower(int n,
Collection<T> source)
Returns a new
StreamEx which elements are List objects
containing all possible n-tuples of the elements of supplied collection. |
static <T,U> StreamEx<U> |
StreamEx.cartesianPower(int n,
Collection<T> source,
U identity,
BiFunction<U,? super T,U> accumulator)
Returns a new
StreamEx which elements are results of reduction of
all possible n-tuples composed from the elements of supplied collections. |
static <T> StreamEx<List<T>> |
StreamEx.cartesianProduct(Collection<? extends Collection<T>> source)
Returns a new
StreamEx which elements are List objects
containing all possible tuples of the elements of supplied collection of
collections. |
static <T,U> StreamEx<U> |
StreamEx.cartesianProduct(Collection<? extends Collection<T>> source,
U identity,
BiFunction<U,? super T,U> accumulator)
Returns a new
StreamEx which elements are results of reduction of
all possible tuples composed from the elements of supplied collection of
collections. |
StreamEx<T> |
StreamEx.collapse(BiPredicate<? super T,? super T> collapsible)
Returns a stream consisting of elements of this stream where every series
of elements matched the predicate is replaced with first element from the
series.
|
StreamEx<T> |
StreamEx.collapse(BiPredicate<? super T,? super T> collapsible,
BinaryOperator<T> merger)
Merge series of adjacent elements which satisfy the given predicate using
the merger function and return a new stream.
|
<R,A> StreamEx<R> |
StreamEx.collapse(BiPredicate<? super T,? super T> collapsible,
Collector<? super T,A,R> collector)
Perform a partial mutable reduction using the supplied
Collector
on a series of adjacent elements. |
static <T> StreamEx<T> |
StreamEx.constant(T value,
long length)
Returns a sequential unordered
StreamEx of given length which
elements are equal to supplied value. |
StreamEx<T> |
StreamEx.distinct(long atLeast)
Returns a
StreamEx consisting of the distinct elements (according
to Object.equals(Object)) which appear at least specified number
of times in this stream. |
<U> StreamEx<U> |
IntStreamEx.elements(List<U> list)
|
<U> StreamEx<U> |
IntStreamEx.elements(U[] array)
Returns an object-valued
StreamEx consisting of the elements of
given array corresponding to the indices which appear in this stream. |
static <T> StreamEx<T> |
StreamEx.empty()
Returns an empty sequential
StreamEx. |
<K> StreamEx<T> |
StreamEx.filterBy(Function<? super T,? extends K> mapper,
K value)
Returns a stream consisting of the elements of this stream for which the
supplied mapper function returns the given value.
|
<R> StreamEx<R> |
AbstractStreamEx.flatArray(Function<? super T,? extends R[]> mapper)
Returns a stream consisting of the results of replacing each element of
this stream with the contents of a mapped array produced by applying
the provided mapping function to each element.
|
<R> StreamEx<R> |
AbstractStreamEx.flatCollection(Function<? super T,? extends Collection<? extends R>> mapper)
Returns a stream consisting of the results of replacing each element of
this stream with the contents of a mapped collection produced by applying
the provided mapping function to each element.
|
<R> StreamEx<R> |
AbstractStreamEx.flatMap(Function<? super T,? extends Stream<? extends R>> mapper) |
<R> StreamEx<R> |
EntryStream.flatMapKeyValue(BiFunction<? super K,? super V,? extends Stream<? extends R>> mapper)
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 key-value pair.
|
<R> StreamEx<R> |
DoubleStreamEx.flatMapToObj(DoubleFunction<? extends Stream<R>> mapper)
Returns a
StreamEx 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. |
<R> StreamEx<R> |
IntStreamEx.flatMapToObj(IntFunction<? extends Stream<R>> mapper)
Returns a
StreamEx 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. |
<R> StreamEx<R> |
LongStreamEx.flatMapToObj(LongFunction<? extends Stream<R>> mapper)
Returns a
StreamEx 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. |
static <T> StreamEx<T> |
StreamEx.generate(Supplier<T> s)
Returns an infinite sequential unordered
StreamEx where each
element is generated by the provided Supplier. |
StreamEx<List<T>> |
StreamEx.groupRuns(BiPredicate<? super T,? super T> sameGroup)
Returns a stream consisting of lists of elements of this stream where
adjacent elements are grouped according to supplied predicate.
|
<R> StreamEx<R> |
StreamEx.headTail(BiFunction<? super T,? super StreamEx<T>,? extends Stream<R>> mapper)
Creates a new Stream which is the result of applying of the mapper
BiFunction to the first element of the current stream (head) and
the stream containing the rest elements (tail). |
<R> StreamEx<R> |
StreamEx.headTail(BiFunction<? super T,? super StreamEx<T>,? extends Stream<R>> mapper,
Supplier<? extends Stream<R>> supplier)
Creates a new Stream which is the result of applying of the mapper
BiFunction to the first element of the current stream (head) and
the stream containing the rest elements (tail) or supplier if the current
stream is empty. |
<U> StreamEx<U> |
StreamEx.intervalMap(BiPredicate<? super T,? super T> sameInterval,
BiFunction<? super T,? super T,? extends U> mapper)
Returns a stream consisting of results of applying the given function to
the intervals created from the source elements.
|
static <T> StreamEx<T> |
StreamEx.iterate(T seed,
Predicate<? super T> predicate,
UnaryOperator<T> f)
Returns a sequential ordered
StreamEx produced by iterative
application of a function to an initial element, conditioned on
satisfying the supplied predicate. |
static <T> StreamEx<T> |
StreamEx.iterate(T seed,
UnaryOperator<T> f)
Returns an infinite sequential ordered
StreamEx produced by
iterative application of a function f to an initial element
seed, producing a StreamEx consisting of seed,
f(seed), f(f(seed)), etc. |
StreamEx<String> |
EntryStream.join(CharSequence delimiter)
Returns a
StreamEx of strings which are created joining the keys
and values of the current stream using the specified delimiter. |
StreamEx<String> |
EntryStream.join(CharSequence delimiter,
CharSequence prefix,
CharSequence suffix)
Returns a
StreamEx of strings which are created joining the keys
and values of the current stream using the specified delimiter, with the
specified prefix and suffix. |
StreamEx<K> |
EntryStream.keys()
Returns a stream consisting of the keys of this stream elements.
|
<R> StreamEx<R> |
AbstractStreamEx.map(Function<? super T,? extends R> mapper) |
StreamEx<T> |
StreamEx.mapFirst(Function<? super T,? extends T> mapper)
Returns a stream where the first element is the replaced with the result
of applying the given function while the other elements are left intact.
|
<R> StreamEx<R> |
StreamEx.mapFirstOrElse(Function<? super T,? extends R> firstMapper,
Function<? super T,? extends R> notFirstMapper)
Returns a stream where the first element is transformed using
firstMapper function and other elements are transformed using
notFirstMapper function. |
<R> StreamEx<R> |
EntryStream.mapKeyValue(BiFunction<? super K,? super V,? extends R> mapper)
Returns a
StreamEx consisting of the results of applying the
given function to the keys and values of this stream. |
StreamEx<T> |
StreamEx.mapLast(Function<? super T,? extends T> mapper)
Returns a stream where the last element is the replaced with the result
of applying the given function while the other elements are left intact.
|
<R> StreamEx<R> |
StreamEx.mapLastOrElse(Function<? super T,? extends R> notLastMapper,
Function<? super T,? extends R> lastMapper)
Returns a stream where the last element is transformed using
lastMapper function and other elements are transformed using
notLastMapper function. |
<U> StreamEx<U> |
DoubleStreamEx.mapToObj(DoubleFunction<? extends U> mapper) |
<U> StreamEx<U> |
IntStreamEx.mapToObj(IntFunction<? extends U> mapper) |
<U> StreamEx<U> |
LongStreamEx.mapToObj(LongFunction<? extends U> mapper) |
StreamEx<T> |
StreamEx.nonNull() |
static <T> StreamEx<T> |
StreamEx.of(Collection<? extends T> collection)
Returns a sequential
StreamEx with given collection as its
source. |
static <T> StreamEx<T> |
StreamEx.of(Enumeration<? extends T> enumeration)
Returns a sequential, ordered
StreamEx created from given
Enumeration. |
static <T> StreamEx<T> |
StreamEx.of(Iterator<? extends T> iterator)
|
static <T> StreamEx<T> |
StreamEx.of(Optional<? extends T> optional)
Returns a sequential
StreamEx containing an Optional
value, if present, otherwise returns an empty StreamEx. |
static <T> StreamEx<T> |
StreamEx.of(Spliterator<? extends T> spliterator)
Returns a sequential
StreamEx created from given
Spliterator. |
static <T> StreamEx<T> |
StreamEx.of(Stream<T> stream)
|
static <T> StreamEx<T> |
StreamEx.of(T... elements)
Returns a sequential ordered
StreamEx whose elements are the
specified values. |
static <T> StreamEx<T> |
StreamEx.of(T element)
Returns a sequential
StreamEx containing a single element. |
static <T> StreamEx<T> |
StreamEx.of(T[] array,
int startInclusive,
int endExclusive)
Returns a sequential
StreamEx with the specified range of the
specified array as its source. |
static <T> StreamEx<T> |
StreamEx.ofKeys(Map<T,?> map)
Returns a sequential
StreamEx with keySet of given Map as
its source. |
static <T,V> StreamEx<T> |
StreamEx.ofKeys(Map<T,V> map,
Predicate<? super V> valueFilter)
Returns a sequential
StreamEx of given Map keys which
corresponding values match the supplied filter. |
static StreamEx<String> |
StreamEx.ofLines(BufferedReader reader)
Returns a
StreamEx, the elements of which are lines read from the
supplied BufferedReader. |
static StreamEx<String> |
StreamEx.ofLines(Path path)
Read all lines from a file as a
StreamEx. |
static StreamEx<String> |
StreamEx.ofLines(Path path,
Charset charset)
Read all lines from a file as a
StreamEx. |
static StreamEx<String> |
StreamEx.ofLines(Reader reader)
Returns a
StreamEx, the elements of which are lines read from the
supplied Reader. |
static <T> StreamEx<T> |
StreamEx.ofNullable(T element)
Returns a sequential
StreamEx containing a single element, if
non-null, otherwise returns an empty StreamEx. |
static <U,T> StreamEx<T> |
StreamEx.ofPairs(List<U> list,
BiFunction<? super U,? super U,? extends T> mapper)
Returns a sequential ordered
StreamEx containing the results of
applying the given mapper function to the all possible pairs of elements
taken from the provided list. |
static <U,T> StreamEx<T> |
StreamEx.ofPairs(U[] array,
BiFunction<? super U,? super U,? extends T> mapper)
Returns a sequential ordered
StreamEx containing the results of
applying the given mapper function to the all possible pairs of elements
taken from the provided array. |
static StreamEx<int[]> |
StreamEx.ofPermutations(int length)
Returns a new
StreamEx of int[] arrays containing all the
possible permutations of numbers from 0 to length-1 in lexicographic
order. |
static <T> StreamEx<T> |
StreamEx.ofReversed(List<? extends T> list)
Returns a sequential
StreamEx which elements are elements of
given list in descending order. |
static <T> StreamEx<T> |
StreamEx.ofReversed(T[] array)
Returns a sequential
StreamEx which elements are elements of
given array in descending order. |
static <T> StreamEx<List<T>> |
StreamEx.ofSubLists(List<T> source,
int length)
Returns a new
StreamEx which consists of non-overlapping sublists
of given source list having the specified length (the last sublist may be
shorter). |
static <T> StreamEx<List<T>> |
StreamEx.ofSubLists(List<T> source,
int length,
int shift)
Returns a new
StreamEx which consists of possibly-overlapping
sublists of given source list having the specified length with given
shift value. |
static <T,TT extends T> |
StreamEx.ofTree(T root,
Class<TT> collectionClass,
Function<TT,Stream<T>> mapper)
Return a new
StreamEx containing all the nodes of tree-like data
structure in depth-first order. |
static <T> StreamEx<T> |
StreamEx.ofTree(T root,
Function<T,Stream<T>> mapper)
Return a new
StreamEx containing all the nodes of tree-like data
structure in depth-first order. |
static <T> StreamEx<T> |
StreamEx.ofValues(Map<?,T> map)
Returns a sequential
StreamEx with values of given Map as
its source. |
static <K,T> StreamEx<T> |
StreamEx.ofValues(Map<K,T> map,
Predicate<? super K> keyFilter)
Returns a sequential
StreamEx of given Map values which
corresponding keys match the supplied filter. |
<R> StreamEx<R> |
StreamEx.pairMap(BiFunction<? super T,? super T,? extends R> mapper)
Returns a stream consisting of the results of applying the given function
to the every adjacent pair of elements of this stream.
|
StreamEx<T> |
StreamEx.peekFirst(Consumer<? super T> action)
Returns a stream consisting of the elements of this stream, additionally
performing the provided action on the first stream element when it's
consumed from the resulting stream.
|
StreamEx<T> |
StreamEx.peekLast(Consumer<? super T> action)
Returns a stream consisting of the elements of this stream, additionally
performing the provided action on the last stream element when it's
consumed from the resulting stream.
|
StreamEx<T> |
StreamEx.prepend(Collection<? extends T> collection)
Returns a new
StreamEx which is a concatenation of the stream
created from supplied collection and this stream. |
StreamEx<T> |
StreamEx.prepend(T... values)
Returns a new
StreamEx which is a concatenation of supplied
values and this stream. |
StreamEx<T> |
StreamEx.prepend(T value)
Returns a new
StreamEx which is a concatenation of supplied value
and this stream. |
static <T> StreamEx<T> |
StreamEx.produce(Predicate<Consumer<? super T>> producer)
Return an ordered stream produced by consecutive calls of the supplied
producer until it returns false.
|
<K> StreamEx<T> |
StreamEx.removeBy(Function<? super T,? extends K> mapper,
K value)
Returns a stream consisting of the elements of this stream except those
for which the supplied mapper function returns the given value.
|
StreamEx<T> |
StreamEx.reverseSorted()
Returns a
StreamEx consisting of the elements of this stream,
sorted according to reverse natural order. |
<TT> StreamEx<TT> |
StreamEx.select(Class<TT> clazz)
Returns a stream consisting of the elements of this stream which are
instances of given class.
|
static StreamEx<String> |
StreamEx.split(CharSequence str,
char delimiter)
Creates a stream from the given input sequence around matches of the
given character.
|
static StreamEx<String> |
StreamEx.split(CharSequence str,
char delimiter,
boolean trimEmpty)
Creates a stream from the given input sequence around matches of the
given character.
|
static StreamEx<String> |
StreamEx.split(CharSequence str,
Pattern pattern)
Creates a stream from the given input sequence around matches of the
given pattern.
|
static StreamEx<String> |
StreamEx.split(CharSequence str,
String regex)
Creates a stream from the given input sequence around matches of the
given pattern represented as String.
|
default StreamEx<T> |
StreamEx.Emitter.stream()
Returns the stream which covers all the elements emitted by this
emitter.
|
StreamEx<V> |
EntryStream.values()
Returns a stream consisting of the values of this stream elements.
|
<R> StreamEx<R> |
StreamEx.withFirst(BiFunction<? super T,? super T,? extends R> mapper)
Returns a stream consisting of the results of applying the given function
to the the first element and every other element of this stream.
|
StreamEx<T> |
StreamEx.without(T... values)
Returns a stream consisting of the elements of this stream that don't
equal to any of the supplied values.
|
StreamEx<T> |
StreamEx.without(T value)
Returns a stream consisting of the elements of this stream that don't
equal to the given value.
|
static <U,V,T> StreamEx<T> |
StreamEx.zip(List<U> first,
List<V> second,
BiFunction<? super U,? super V,? extends T> mapper)
Returns a sequential
StreamEx containing the results of applying
the given function to the corresponding pairs of values in given two
lists. |
static <U,V,T> StreamEx<T> |
StreamEx.zip(U[] first,
V[] second,
BiFunction<? super U,? super V,? extends T> mapper)
Returns a sequential
StreamEx containing the results of applying
the given function to the corresponding pairs of values in given two
arrays. |
<V,R> StreamEx<R> |
StreamEx.zipWith(Stream<V> other,
BiFunction<? super T,? super V,? extends R> mapper)
Creates a new
StreamEx which is the result of applying of the
mapper BiFunction to the corresponding elements of this stream
and the supplied other stream. |
| Modifier and Type | Method and Description |
|---|---|
<R> StreamEx<R> |
StreamEx.headTail(BiFunction<? super T,? super StreamEx<T>,? extends Stream<R>> mapper)
Creates a new Stream which is the result of applying of the mapper
BiFunction to the first element of the current stream (head) and
the stream containing the rest elements (tail). |
<R> StreamEx<R> |
StreamEx.headTail(BiFunction<? super T,? super StreamEx<T>,? extends Stream<R>> mapper,
Supplier<? extends Stream<R>> supplier)
Creates a new Stream which is the result of applying of the mapper
BiFunction to the first element of the current stream (head) and
the stream containing the rest elements (tail) or supplier if the current
stream is empty. |
Copyright © 2017. All rights reserved.