Package | Description |
---|---|
io.vavr |
Beside
API the io.vavr package contains core types like (Checked)Functions and Tuples. |
io.vavr.collection |
Purely functional collections based on Traversable.
|
Modifier and Type | Method and Description |
---|---|
default Tree<T> |
Value.toTree()
Converts this to a
Tree . |
Modifier and Type | Class and Description |
---|---|
static class |
Tree.Empty<T>
The empty tree.
|
static class |
Tree.Node<T>
Represents a tree node.
|
Modifier and Type | Method and Description |
---|---|
default <R> Tree<R> |
Tree.collect(PartialFunction<? super T,? extends R> partialFunction) |
static <T> Tree<T> |
Tree.fill(int n,
Supplier<? extends T> s)
Returns a Tree containing
n values supplied by a given Supplier s . |
static <T> Tree<T> |
Tree.fill(int n,
T element)
Returns a Tree containing
n times the given element |
default <U> Tree<U> |
Tree.flatMap(Function<? super T,? extends Iterable<? extends U>> mapper) |
default <U> Tree<U> |
Tree.map(Function<? super T,? extends U> mapper) |
static <T> Tree<T> |
Tree.narrow(Tree<? extends T> tree)
Narrows a widened
Tree<? extends T> to Tree<T>
by performing a type-safe cast. |
static <T> Tree<T> |
Tree.of(T... values)
Creates a Tree of the given elements.
|
static <T> Tree<T> |
Tree.ofAll(Iterable<? extends T> iterable)
Creates a Tree of the given elements.
|
static <T> Tree<T> |
Tree.ofAll(Stream<? extends T> javaStream)
Creates a Tree that contains the elements of the given
Stream . |
default Tree<T> |
Tree.orElse(Iterable<? extends T> other) |
default Tree<T> |
Tree.orElse(Supplier<? extends Iterable<? extends T>> supplier) |
default Tree<T> |
Tree.peek(Consumer<? super T> action) |
default Tree<T> |
Tree.replace(T currentElement,
T newElement) |
default Tree<T> |
Tree.replaceAll(T currentElement,
T newElement) |
static <T> Tree<T> |
Tree.tabulate(int n,
Function<? super Integer,? extends T> f)
Returns a Tree containing
n values of a given Function f
over a range of integer values from 0 to n - 1 . |
default <U> Tree<Tuple2<T,U>> |
Tree.zip(Iterable<? extends U> that) |
default <U> Tree<Tuple2<T,U>> |
Tree.zipAll(Iterable<? extends U> that,
T thisElem,
U thatElem) |
default <U,R> Tree<R> |
Tree.zipWith(Iterable<? extends U> that,
BiFunction<? super T,? super U,? extends R> mapper) |
default Tree<Tuple2<T,Integer>> |
Tree.zipWithIndex() |
default <U> Tree<U> |
Tree.zipWithIndex(BiFunction<? super T,? super Integer,? extends U> mapper) |
Modifier and Type | Method and Description |
---|---|
static <T> Collector<T,ArrayList<T>,Tree<T>> |
Tree.collector()
Returns a
Collector which may be used in conjunction with
Stream.collect(java.util.stream.Collector) to obtain a Tree . |
default <T1,T2> Tuple2<Tree<T1>,Tree<T2>> |
Tree.unzip(Function<? super T,Tuple2<? extends T1,? extends T2>> unzipper) |
default <T1,T2> Tuple2<Tree<T1>,Tree<T2>> |
Tree.unzip(Function<? super T,Tuple2<? extends T1,? extends T2>> unzipper) |
default <T1,T2,T3> Tuple3<Tree<T1>,Tree<T2>,Tree<T3>> |
Tree.unzip3(Function<? super T,Tuple3<? extends T1,? extends T2,? extends T3>> unzipper) |
default <T1,T2,T3> Tuple3<Tree<T1>,Tree<T2>,Tree<T3>> |
Tree.unzip3(Function<? super T,Tuple3<? extends T1,? extends T2,? extends T3>> unzipper) |
default <T1,T2,T3> Tuple3<Tree<T1>,Tree<T2>,Tree<T3>> |
Tree.unzip3(Function<? super T,Tuple3<? extends T1,? extends T2,? extends T3>> unzipper) |
Modifier and Type | Method and Description |
---|---|
static <T> Tree<T> |
Tree.narrow(Tree<? extends T> tree)
Narrows a widened
Tree<? extends T> to Tree<T>
by performing a type-safe cast. |
Modifier and Type | Method and Description |
---|---|
default <U> U |
Tree.transform(Function<? super Tree<T>,? extends U> f)
Transforms this
Tree . |
Copyright © 2020. All Rights Reserved.