Uses of Interface
io.vavr.collection.Traversable
Packages that use Traversable
Package
Description
Beside
API the io.vavr package contains core types like (Checked)Functions and Tuples.Purely functional collections based on Traversable.
-
Uses of Traversable in io.vavr
Methods in io.vavr with type parameters of type TraversableModifier and TypeMethodDescriptionstatic <T,R extends Traversable<T>>
RValueModule.toTraversable(Value<T> value, R empty, Function<T, R> ofElement, Function<Iterable<T>, R> ofAll) -
Uses of Traversable in io.vavr.collection
Classes in io.vavr.collection with type parameters of type TraversableModifier and TypeClassDescriptionprivate static classJavaConverters.HasDelegate<C extends Traversable<?>>Encapsulates the access to delegate and performs mutability checks.Subinterfaces of Traversable in io.vavr.collectionModifier and TypeInterfaceDescriptioninterfaceBitSet<T>An immutableBitSetimplementation.interfaceIndexedSeq<T>Represents an immutable, indexed sequence of elements.interfaceIterator<T>A compositional alternative tojava.util.Iteratordesigned for single-pass traversal of a sequence.interfaceLinearSeq<T>Interface for immutable, linear sequences.interfaceList<T>An immutableListis an eager sequence of elements.interfaceMap<K,V> An immutableMapinterface.interfaceMultimap<K,V> An immutableMultimapinterface.interfaceSeq<T>Base interface for immutable, sequential collections.interfaceSet<T>An immutableSetinterface.interfaceSortedMap<K,V> An immutableSortedMapinterface.interfaceSortedMultimap<K,V> An immutableSortedMultimapinterface.interfaceSortedSet<T>An immutableSortedSetinterface.interfaceStream<T>An immutableStreamis lazy sequence of elements which may be infinitely long.interfaceTree<T>A general Tree interface.Classes in io.vavr.collection that implement TraversableModifier and TypeClassDescription(package private) classProvides a commonObject.toString()implementation.(package private) classAbstractMultimap<K,V, M extends Multimap<K, V>> An abstract base implementation of theMultimapinterface that provides common functionality for concrete Multimap implementations.(package private) classAbstractQueue<T,Q extends AbstractQueue<T, Q>> final classArray<T>Array is an immutable Traversable wrapper forObject[]containing elements of typeT.static classstatic classstatic classstatic classstatic classfinal classThe CharSeq (read: character sequence) collection essentially is a rich String wrapper having all operations we know from the functional Vavr collections.static classfinal classHashMap<K,V> An immutableHashMapimplementation based on a Hash array mapped trie (HAMT).final classHashMultimap<K,V> final classHashSet<T>An immutableHashSetimplementation.static final classstatic final classstatic final classstatic final classstatic final classfinal classLinkedHashMap<K,V> An immutableLinkedHashMapimplementation that has predictable (insertion-order) iteration.final classLinkedHashMultimap<K,V> ALinkedHashMap-based implementation ofMultimapfinal classAn immutableHashSetimplementation that has predictable (insertion-order) iteration.static final classList.Cons<T>Non-emptyList, consisting of aheadand atail.static final classList.Nil<T>Representation of the singleton emptyList.final classA PriorityQueue.final classQueue<T>An immutableQueuestores elements allowing a first-in-first-out (FIFO) retrieval.static classStream.Cons<T>Non-emptyStream, consisting of ahead, andtail.static final classStream.Empty<T>The empty Stream.static final classstatic final classstatic final classstatic final classstatic final classTree.Empty<T>The empty tree.static final classTree.Node<T>Represents a tree node.final classTreeMap<K,V> An immutableSortedMapimplementation backed by a Red-Black tree.final classTreeMultimap<K,V> final classTreeSet<T>SortedSet implementation, backed by a Red/Black Tree.final classVector<T>Vector is the default Seq implementation that provides effectively constant time access to any element.Fields in io.vavr.collection declared as TraversableFields in io.vavr.collection with type parameters of type TraversableModifier and TypeFieldDescriptionprivate final BiFunction<Traversable<?>, Object, Traversable<?>> Multimap.ContainerType.addprivate final BiFunction<Traversable<?>, Object, Traversable<?>> Multimap.ContainerType.addprotected final Map<K, Traversable<V>> AbstractMultimap.backThe backing map that stores the key-value pairs.protected final AbstractMultimap.SerializableSupplier<Traversable<?>> AbstractMultimap.emptyContainerA supplier that creates empty containers for new key entries.private final AbstractMultimap.SerializableSupplier<Traversable<?>> HashMultimap.Builder.emptyContainerprivate final AbstractMultimap.SerializableSupplier<Traversable<?>> LinkedHashMultimap.Builder.emptyContainerprivate final AbstractMultimap.SerializableSupplier<Traversable<?>> TreeMultimap.Builder.emptyContainerprivate final BiFunction<Traversable<?>, Object, Traversable<?>> Multimap.ContainerType.removeprivate final BiFunction<Traversable<?>, Object, Traversable<?>> Multimap.ContainerType.removeMethods in io.vavr.collection with type parameters of type TraversableModifier and TypeMethodDescription(package private) static <C extends Traversable<T>,T>
C(package private) static <C extends Traversable<T>,T>
CCollections.fillObject(int n, T element, @NonNull C empty, @NonNull Function<T[], C> of) (package private) static <C extends Traversable<T>,T>
Tuple2<C, C> Collections.partition(C collection, Function<Iterable<T>, C> creator, Predicate<? super T> predicate) (package private) static <C extends Traversable<T>,T>
C(package private) static <C extends Traversable<T>,T>
C(package private) static <C extends Traversable<T>,T>
CCollections.removeAll(C source, T element) (package private) static <C extends Traversable<T>,T>
C(package private) static <T,U, R extends Traversable<U>>
RCollections.scanLeft(Traversable<? extends T> source, U zero, BiFunction<? super U, ? super T, ? extends U> operation, Function<Iterator<U>, R> finisher) (package private) static <T,U, R extends Traversable<U>>
RCollections.scanRight(Traversable<? extends T> source, U zero, BiFunction<? super T, ? super U, ? extends U> operation, Function<Iterator<U>, R> finisher) (package private) static <C extends Traversable<T>,T>
CMethods in io.vavr.collection that return TraversableModifier and TypeMethodDescription(package private) <T> Traversable<T> Multimap.ContainerType.add(Traversable<?> container, T elem) default Traversable<V> Deprecated.<R> Traversable<R> Traversable.collect(@NonNull PartialFunction<? super T, ? extends R> partialFunction) Applies aPartialFunctionto all elements that are defined for it and collects the results.Traversable.distinct()Returns a newTraversablecontaining the elements of this instance with all duplicates removed.Traversable.distinctBy(@NonNull Comparator<? super T> comparator) Returns a newTraversablecontaining the elements of this instance without duplicates, as determined by the givencomparator.<U> Traversable<T> Traversable.distinctBy(@NonNull Function<? super T, ? extends U> keyExtractor) Returns a newTraversablecontaining the elements of this instance without duplicates, based on keys extracted from elements usingkeyExtractor.Traversable.drop(int n) Returns a newTraversablewithout the firstnelements, or an empty instance if this contains fewer thannelements.Traversable.dropRight(int n) Returns a newTraversablewithout the lastnelements, or an empty instance if this contains fewer thannelements.Returns a newTraversablestarting from the first element that satisfies the givenpredicate, dropping all preceding elements.Returns a newTraversablestarting from the first element that does not satisfy the givenpredicate, dropping all preceding elements.Returns a new traversable containing only the elements that satisfy the given predicate.<U> Traversable<U> Transforms each element of this Traversable into anIterableof elements and flattens the resulting iterables into a single Traversable.AbstractMultimap.getOrElse(K key, Traversable<? extends V> defaultValue) Multimap.getOrElse(K key, Traversable<? extends V> defaultValue) Returns the value associated with a key, or a default value if the key is not contained in the mapTraversable.init()Returns all elements of this Traversable except the last one.<U> Traversable<U> Transforms the elements of this Traversable to a new type, preserving order if defined.default <U> Traversable<U> Traversable.mapTo(U value) default Traversable<Void> Traversable.mapToVoid()static <T> Traversable<T> Traversable.narrow(Traversable<? extends T> traversable) Narrows aTraversable<? extends T>toTraversable<T>with a type-safe cast.Returns thisTraversableif it is non-empty; otherwise, returns the given alternative.Returns thisTraversableif it is non-empty; otherwise, returns the result of evaluating the given supplier.default Traversable<T> Returns a new traversable containing only the elements that do not satisfy the given predicate.(package private) <T> Traversable<T> Multimap.ContainerType.remove(Traversable<?> container, T elem) Replaces the first occurrence ofcurrentElementwithnewElement, if it exists.Traversable.replaceAll(T currentElement, T newElement) Replaces all occurrences ofcurrentElementwithnewElement.Retains only the elements from this Traversable that are contained in the givenelements.default Traversable<T> Computes a prefix scan of the elements of this Traversable.<U> Traversable<U> Traversable.scanLeft(U zero, @NonNull BiFunction<? super U, ? super T, ? extends U> operation) Produces a collection containing cumulative results of applying the operator from left to right.<U> Traversable<U> Traversable.scanRight(U zero, @NonNull BiFunction<? super T, ? super U, ? extends U> operation) Produces a collection containing cumulative results of applying the operator from right to left.Traversable.tail()Returns a newTraversablewithout its first element.Traversable.take(int n) Returns the firstnelements of thisTraversable, or all elements ifnexceeds the length.Traversable.takeRight(int n) Returns the lastnelements of thisTraversable, or all elements ifnexceeds the length.Takes elements from thisTraversableuntil the given predicate holds for an element.Takes elements from thisTraversablewhile the given predicate holds.AbstractMultimap.values()Multimap.values()Returns aTraversablecontaining all the values of thisMultimap.<U> Traversable<Tuple2<T, U>> Returns aTraversableformed by pairing elements of thisTraversablewith elements of anotherIterable.<U> Traversable<Tuple2<T, U>> Returns aTraversableformed by pairing elements of thisTraversablewith elements of anotherIterable, filling in placeholder elements when one collection is shorter than the other.<U,R> Traversable <R> Traversable.zipWith(@NonNull Iterable<? extends U> that, BiFunction<? super T, ? super U, ? extends R> mapper) Returns aTraversableby combining elements of thisTraversablewith elements of anotherIterableusing a mapping function.Traversable.zipWithIndex()Zips thisTraversablewith its indices, starting at 0.<U> Traversable<U> Traversable.zipWithIndex(@NonNull BiFunction<? super T, ? super Integer, ? extends U> mapper) Zips thisTraversablewith its indices and maps the resulting pairs using the provided mapper.Methods in io.vavr.collection that return types with arguments of type TraversableModifier and TypeMethodDescriptionMap<K, Traversable<V>> AbstractMultimap.asMap()Map<K, Traversable<V>> Multimap.asMap()Converts thisMultimapto aMapdefault PartialFunction<K, Traversable<V>> Multimap.asPartialFunction()Turns thisMultimapinto aPartialFunctionwhich is defined at a specific index, if thisMultimapcontains the given key.Returns theSomeof value to which the specified key is mapped, orNoneif this multimap contains no mapping for the key.<C> Map<C, ? extends Traversable<T>> Groups elements of thisTraversablebased on a classifier function.Iterator<? extends Traversable<T>> Traversable.grouped(int size) Splits thisTraversableinto consecutive blocks of the given size.default Option<? extends Traversable<T>> Traversable.initOption()Returns all elements of this Traversable except the last one, wrapped in anOption.Tuple2<? extends Traversable<T>, ? extends Traversable<T>> Splits thisTraversableinto two partitions according to a predicate.Tuple2<? extends Traversable<T>, ? extends Traversable<T>> Splits thisTraversableinto two partitions according to a predicate.Iterator<? extends Traversable<T>> Partitions thisTraversableinto consecutive non-overlapping windows according to a classification function.Iterator<? extends Traversable<T>> Traversable.sliding(int size) Slides a window of a givensizeover thisTraversablewith a step size of 1.Iterator<? extends Traversable<T>> Traversable.sliding(int size, int step) Slides a window of a specificsizewith a givenstepover thisTraversable.Tuple2<? extends Traversable<T>, ? extends Traversable<T>> Splits thisTraversableinto a prefix and remainder according to the givenpredicate.Tuple2<? extends Traversable<T>, ? extends Traversable<T>> Splits thisTraversableinto a prefix and remainder according to the givenpredicate.default Option<? extends Traversable<T>> Traversable.tailOption()Returns a newTraversablewithout its first element as anOption.<T1,T2> Tuple2 <? extends Traversable<T1>, ? extends Traversable<T2>> Unzips the elements of thisTraversableby mapping each element to a pair and splitting them into two separateTraversablecollections.<T1,T2> Tuple2 <? extends Traversable<T1>, ? extends Traversable<T2>> Unzips the elements of thisTraversableby mapping each element to a pair and splitting them into two separateTraversablecollections.<T1,T2, T3>
Tuple3<? extends Traversable<T1>, ? extends Traversable<T2>, ? extends Traversable<T3>> Traversable.unzip3(@NonNull Function<? super T, Tuple3<? extends T1, ? extends T2, ? extends T3>> unzipper) Unzips the elements of thisTraversableby mapping each element to a triple and splitting them into three separateTraversablecollections.<T1,T2, T3>
Tuple3<? extends Traversable<T1>, ? extends Traversable<T2>, ? extends Traversable<T3>> Traversable.unzip3(@NonNull Function<? super T, Tuple3<? extends T1, ? extends T2, ? extends T3>> unzipper) Unzips the elements of thisTraversableby mapping each element to a triple and splitting them into three separateTraversablecollections.<T1,T2, T3>
Tuple3<? extends Traversable<T1>, ? extends Traversable<T2>, ? extends Traversable<T3>> Traversable.unzip3(@NonNull Function<? super T, Tuple3<? extends T1, ? extends T2, ? extends T3>> unzipper) Unzips the elements of thisTraversableby mapping each element to a triple and splitting them into three separateTraversablecollections.Methods in io.vavr.collection with parameters of type TraversableModifier and TypeMethodDescription(package private) <T> Traversable<T> Multimap.ContainerType.add(Traversable<?> container, T elem) AbstractMultimap.getOrElse(K key, Traversable<? extends V> defaultValue) Multimap.getOrElse(K key, Traversable<? extends V> defaultValue) Returns the value associated with a key, or a default value if the key is not contained in the mapprivate static <T,C> Set <Map.Entry<C, Collection<T>>> Collections.groupBy(Traversable<T> source, Function<? super T, ? extends C> classifier) Collections.groupBy(Traversable<T> source, Function<? super T, ? extends C> classifier, Function<? super Iterable<T>, R> mapper) (package private) static <T> TCollections.last(Traversable<T> source) static <T> Traversable<T> Traversable.narrow(Traversable<? extends T> traversable) Narrows aTraversable<? extends T>toTraversable<T>with a type-safe cast.(package private) <T> Traversable<T> Multimap.ContainerType.remove(Traversable<?> container, T elem) (package private) static <T,U, R extends Traversable<U>>
RCollections.scanLeft(Traversable<? extends T> source, U zero, BiFunction<? super U, ? super T, ? extends U> operation, Function<Iterator<U>, R> finisher) (package private) static <T,U, R extends Traversable<U>>
RCollections.scanRight(Traversable<? extends T> source, U zero, BiFunction<? super T, ? super U, ? extends U> operation, Function<Iterator<U>, R> finisher) Method parameters in io.vavr.collection with type arguments of type TraversableModifier and TypeMethodDescriptionprotected abstract <K2,V2> Multimap <K2, V2> AbstractMultimap.createFromMap(Map<K2, Traversable<V2>> back) Creates a new Multimap instance from the given backing map.protected <K2,V2> HashMultimap <K2, V2> HashMultimap.createFromMap(Map<K2, Traversable<V2>> back) protected <K2,V2> LinkedHashMultimap <K2, V2> LinkedHashMultimap.createFromMap(@NonNull Map<K2, Traversable<V2>> back) protected <K2,V2> TreeMultimap <K2, V2> TreeMultimap.createFromMap(@NonNull Map<K2, Traversable<V2>> back) AbstractMultimap.merge(@NonNull Multimap<K2, V2> that, @NonNull BiFunction<Traversable<V>, Traversable<V2>, Traversable<V>> collisionResolution) AbstractMultimap.merge(@NonNull Multimap<K2, V2> that, @NonNull BiFunction<Traversable<V>, Traversable<V2>, Traversable<V>> collisionResolution) AbstractMultimap.merge(@NonNull Multimap<K2, V2> that, @NonNull BiFunction<Traversable<V>, Traversable<V2>, Traversable<V>> collisionResolution) Multimap.merge(@NonNull Multimap<K2, V2> that, @NonNull BiFunction<Traversable<V>, Traversable<V2>, Traversable<V>> collisionResolution) Creates a new multimap which by merging the entries ofthismultimap andthatmultimap.Multimap.merge(@NonNull Multimap<K2, V2> that, @NonNull BiFunction<Traversable<V>, Traversable<V2>, Traversable<V>> collisionResolution) Creates a new multimap which by merging the entries ofthismultimap andthatmultimap.Multimap.merge(@NonNull Multimap<K2, V2> that, @NonNull BiFunction<Traversable<V>, Traversable<V2>, Traversable<V>> collisionResolution) Creates a new multimap which by merging the entries ofthismultimap andthatmultimap.<K2 extends K,V2 extends V>
SortedMultimap<K, V> SortedMultimap.merge(@NonNull Multimap<K2, V2> that, @NonNull BiFunction<Traversable<V>, Traversable<V2>, Traversable<V>> collisionResolution) <K2 extends K,V2 extends V>
SortedMultimap<K, V> SortedMultimap.merge(@NonNull Multimap<K2, V2> that, @NonNull BiFunction<Traversable<V>, Traversable<V2>, Traversable<V>> collisionResolution) <K2 extends K,V2 extends V>
SortedMultimap<K, V> SortedMultimap.merge(@NonNull Multimap<K2, V2> that, @NonNull BiFunction<Traversable<V>, Traversable<V2>, Traversable<V>> collisionResolution) (package private) static <K,V, M extends Map<K, V>>
MMaps.scan(M map, Tuple2<K, V> zero, BiFunction<? super Tuple2<K, V>, ? super Tuple2<K, V>, ? extends Tuple2<K, V>> operation, Function<Iterator<Tuple2<K, V>>, Traversable<Tuple2<K, V>>> finisher) Constructor parameters in io.vavr.collection with type arguments of type TraversableModifierConstructorDescription(package private)AbstractMultimap(Map<K, Traversable<V>> back, Multimap.ContainerType containerType, AbstractMultimap.SerializableSupplier<Traversable<?>> emptyContainer) Creates a new AbstractMultimap with the specified backing map, container type, and empty container supplier.(package private)AbstractMultimap(Map<K, Traversable<V>> back, Multimap.ContainerType containerType, AbstractMultimap.SerializableSupplier<Traversable<?>> emptyContainer) Creates a new AbstractMultimap with the specified backing map, container type, and empty container supplier.privateBuilder(Multimap.ContainerType containerType, AbstractMultimap.SerializableSupplier<Traversable<?>> emptyContainer) privateBuilder(Multimap.ContainerType containerType, AbstractMultimap.SerializableSupplier<Traversable<?>> emptyContainer) privateBuilder(Multimap.ContainerType containerType, AbstractMultimap.SerializableSupplier<Traversable<?>> emptyContainer) privateContainerType(BiFunction<Traversable<?>, Object, Traversable<?>> add, BiFunction<Traversable<?>, Object, Traversable<?>> remove, Supplier<Collection<?>> instantiate) privateContainerType(BiFunction<Traversable<?>, Object, Traversable<?>> add, BiFunction<Traversable<?>, Object, Traversable<?>> remove, Supplier<Collection<?>> instantiate) privateHashMultimap(Map<K, Traversable<V>> back, Multimap.ContainerType containerType, AbstractMultimap.SerializableSupplier<Traversable<?>> emptyContainer) privateHashMultimap(Map<K, Traversable<V>> back, Multimap.ContainerType containerType, AbstractMultimap.SerializableSupplier<Traversable<?>> emptyContainer) privateLinkedHashMultimap(Map<K, Traversable<V>> back, Multimap.ContainerType containerType, AbstractMultimap.SerializableSupplier<Traversable<?>> emptyContainer) privateLinkedHashMultimap(Map<K, Traversable<V>> back, Multimap.ContainerType containerType, AbstractMultimap.SerializableSupplier<Traversable<?>> emptyContainer) privateTreeMultimap(Map<K, Traversable<V>> back, Multimap.ContainerType containerType, AbstractMultimap.SerializableSupplier<Traversable<?>> emptyContainer) privateTreeMultimap(Map<K, Traversable<V>> back, Multimap.ContainerType containerType, AbstractMultimap.SerializableSupplier<Traversable<?>> emptyContainer)