Additional top-level class in compilation unit: TreeModule.
| Modifier and Type | Class and Description |
|---|---|
| public static class | |
| public static class | |
| public static enum | Tree.
Tree traversal order. |
| Modifier and Type | Field and Description |
|---|---|
| public static final long |
| Modifier and Type | Method and Description |
|---|---|
| public default int | Returns: The number of branches of this tree.Counts the number of branches of this tree. |
| public static < Value type T, Id type ID> List | Returns: a new, maybe emptyList instance with non-empty Tree instancesFlat source source, Function<? super T, ? extends ID> A mapper from source item to unique identifier of that item idMapper, Function<? super T, ? extends ID> A mapper from source item to unique identifier of parent item. Need return null for root items parentMapper)Build a |
| public default <R> Tree | collect(PartialFunction<? super T, ? extends R>
A function that is not necessarily defined of all elements of this traversable. partialFunction)Implements io. Collects all elements that are in the domain of the given |
| public static < Component type of the Tree. T> Collector | Returns: A io.vavr.collection.Tree Collector.Returns a |
| public default Seq | distinct()
Implements io. Returns a new version of this which contains no duplicates. |
| public default Seq | distinctBy(Comparator<? super T>
A comparator comparator)Implements io. Returns a new version of this which contains no duplicates. |
| public default <U> Seq | distinctBy(Function<? super T, ? extends U>
A key extractor keyExtractor)Implements io. Returns a new version of this which contains no duplicates. |
| public String | Returns: A nice string representation of the tree.Creates a neat 2-dimensional drawing of a tree. |
| public default Seq | drop(int
The number of elements to drop. n)Implements io. Drops the first n elements of this or all elements, if this length < n. |
| public default Seq | dropRight(int
The number of elements to drop. n)Implements io. Drops the last n elements of this or all elements, if this length < n. |
| public default Seq | dropUntil(Predicate<? super T>
A condition tested subsequently for this elements. predicate)Implements io. Drops elements until the predicate holds for the current element. |
| public default Seq | dropWhile(Predicate<? super T>
A condition tested subsequently for this elements. predicate)Implements io. Drops elements while the predicate holds for the current element. |
| public static < Type of tree values. T> Tree. | |
| public boolean | equals(Object
an object, may be null o)Redeclares io. In Vavr there are four basic classes of collections:
|
| public static < Component type of the Tree T> Tree | |
| public static < Component type of the Tree T> Tree | Returns: A Tree of sizen, where each element is the given element.The number of elements in the Tree n, T The element element)Returns a Tree containing |
| public default Seq | filter(Predicate<? super T>
A predicate predicate)Implements io. Returns a new traversable consisting of all elements which satisfy the given predicate. |
| public default <U> Tree | flatMap(Function<? super T, ? extends Iterable<? extends U>>
A mapper mapper)Implements io. FlatMaps this Traversable. |
| public default <U> U | foldRight(U
A zero element to start with. zero, BiFunction<? super T, ? super U, ? extends U> A function which combines elements. f)Implements io. Folds this elements from the right, starting with |
| public List | |
| public T | |
| public default <C> Map | groupBy(Function<? super T, ? extends C>
A function which classifies elements into classes classifier)Implements io. Groups this elements by classifying the elements. |
| public default Iterator | grouped(int
a positive block size size)Implements io. Groups this |
| public default boolean | hasDefiniteSize()
Implements io. Checks if this Traversable is known to have a finite size. |
| public int | hashCode()
Redeclares io. Returns the hash code of this collection. |
| public default T | head()
Implements io. Returns the first element of a non-empty Traversable. |
| public default Seq | init()
Implements io. Dual of tail(), returning all elements except the last. |
| public default Option | initOption()
Overrides default io. Dual of tailOption(), returning all elements except the last as |
| public default boolean | |
| public default boolean | |
| public default boolean | isDistinct()
Overrides default io. Checks if this Traversable may consist of distinct elements only. |
| public default boolean | |
| public boolean | |
| public default boolean | isSequential()
Overrides default io. Checks if the elements of this Traversable appear in encounter order. |
| public default boolean | isTraversableAgain()
Implements io. Checks if this Traversable can be repeatedly traversed. |
| public default Iterator | |
| public default Iterator | iterator()
Overrides default io. An iterator by means of head() and tail(). |
| public default int | |
| public default <U> Tree | map(Function<? super T, ? extends U>
A mapper. mapper)Implements io. Maps the elements of this |
| public static < Component type of the T> TreeTree. | |
| public default int | Returns: The number of nodes of this tree.Counts the number of nodes (i.e. branches and leaves) of this tree. |
| public static < Value type T> Tree. | Returns: A new Node instance.A value value)Returns a new Node containing the given value and having no children. |
| public static < Value type T> Tree. | |
| public static < Value type T> Tree. | |
| public static < Component type of the List. T> Tree | Returns: A Tree containing the given values.Zero or more values. values)Creates a Tree of the given elements. |
| public static < Component type of the List. T> Tree | |
| public static < Component type of the Stream. T> Tree | Returns: A Tree containing the given elements in the same order.Creates a Tree that contains the elements of the given |
| public default Tree | orElse(Iterable<? extends T>
An alternative other)TraversableImplements io. Returns this |
| public default Tree | orElse(Supplier<? extends Iterable<? extends T>>
An alternative supplier)Traversable supplierImplements io. Returns this |
| public default Tuple2 | partition(Predicate<? super T>
A predicate which classifies an element if it is in the first or the second traversable. predicate)Implements io. Creates a partition of this |
| public default Tree | peek(Consumer<? super T>
The action that will be performed on the element(s). action)Implements io. Performs the given |
| public static < Value type T> Tree. | |
| public default Seq | reject(Predicate<? super T>
A predicate predicate)Overrides default io. Returns a new traversable consisting of all elements which do not satisfy the given predicate. |
| public default Tree | replace(T
An element to be substituted. currentElement, T A replacement for currentElement. newElement)Implements io. Replaces the first occurrence (if exists) of the given currentElement with newElement. |
| public default Tree | replaceAll(T
An element to be substituted. currentElement, T A replacement for currentElement. newElement)Implements io. Replaces all occurrences of the given currentElement with newElement. |
| public default Seq | retainAll(Iterable<? extends T>
Elements to be kept. elements)Implements io. Keeps all occurrences of the given elements from this. |
| public default Seq | scan(T
neutral element for the operator op zero, BiFunction<? super T, ? super T, ? extends T> the associative operator for the scan operation)Implements io. Computes a prefix scan of the elements of the collection. |
| public default <U> Seq | scanLeft(U
the initial value zero, BiFunction<? super U, ? super T, ? extends U> the binary operator applied to the intermediate result and the element operation)Implements io. Produces a collection containing cumulative results of applying the operator going left to right. |
| public default <U> Seq | scanRight(U
the initial value zero, BiFunction<? super T, ? super U, ? extends U> the binary operator applied to the intermediate result and the element operation)Implements io. Produces a collection containing cumulative results of applying the operator going right to left. |
| public default Iterator | slideBy(Function<? super T, ?>
A function which classifies elements into classes classifier)Implements io. Slides a non-overlapping window of a variable size over this |
| public default Iterator | sliding(int
a positive window size size)Implements io. Slides a window of a specific |
| public default Iterator | sliding(int
a positive window size size, int a positive step size step)Implements io. Slides a window of a specific |
| public default Tuple2 | span(Predicate<? super T>
A predicate. predicate)Implements io. Returns a tuple where the first element is the longest prefix of elements that satisfy the given
|
| public default String | stringPrefix()
Implements io. Returns the name of this Value type, which is used by toString(). |
| public static < Component type of the Tree T> Tree | |
| public default Seq | tail()
Implements io. Drops the first element of a non-empty Traversable. |
| public default Option | tailOption()
Implements io. Drops the first element of a non-empty Traversable and returns an |
| public default Seq | take(int
The number of elements to take. n)Implements io. Takes the first n elements of this or all elements, if this length < n. |
| public default Seq | takeRight(int
The number of elements to take. n)Implements io. Takes the last n elements of this or all elements, if this length < n. |
| public default Seq | takeUntil(Predicate<? super T>
A condition tested subsequently for this elements. predicate)Implements io. Takes elements until the predicate holds for the current element. |
| public default Seq | takeWhile(Predicate<? super T>
A condition tested subsequently for the contained elements. predicate)Implements io. Takes elements while the predicate holds for the current element. |
| public String | Returns: ThisTree as Lisp-string, i.e. represented as list of lists.Creates a Lisp-like representation of this |
| public String | toString()
Redeclares io. Clarifies that values have a proper toString() method implemented. |
| public default < Type of transformation result U> U | |
| public default Seq | |
| public default Seq | |
| public default <T1, T2> Tuple2 | unzip(Function<? super T, Tuple2<? extends T1, ? extends T2>>
a function which converts elements of this to pairs unzipper)Implements io. Unzips this elements by mapping this elements to pairs which are subsequently split into two distinct sets. |
| public default <T1, T2, T3> Tuple3 | unzip3(Function<? super T, Tuple3<? extends T1, ? extends T2, ? extends T3>>
a function which converts elements of this to pairs unzipper)Implements io. Unzips this elements by mapping this elements to triples which are subsequently split into three distinct sets. |
| public default Seq | |
| public default Seq | |
| public default <U> Tree | zip(Iterable<? extends U>
The Iterable providing the second half of each result pair. that)Implements io. Returns a traversable formed from this traversable and another Iterable collection by combining corresponding elements in pairs. |
| public default <U> Tree | zipAll(Iterable<? extends U>
The Iterable providing the second half of each result pair. that, T The element to be used to fill up the result if this traversable is shorter than that. thisElem, U The element to be used to fill up the result if that is shorter than this traversable. thatElem)Implements io. Returns a traversable formed from this traversable and another Iterable by combining corresponding elements in pairs. |
| public default <U, R> Tree | zipWith(Iterable<? extends U>
The Iterable providing the second parameter of the mapper. that, BiFunction<? super T, ? super U, ? extends R> a mapper. mapper)Implements io. Returns a traversable formed from this traversable and another Iterable collection by mapping elements. |
| public default Tree | zipWithIndex()
Implements io. Zips this traversable with its indices. |
| public default <U> Tree | zipWithIndex(BiFunction<? super T, ? super Integer, ? extends U>
a mapper. mapper)Implements io. Zips this traversable with its indices by applying mapper provided. |