Top Description Interfaces Annotations Classes
module io.vavr

Package io.vavr.collection


Purely functional collections based on io.vavr.collection.Traversable.

Performance Characteristics of Vavr Collections

Time Complexity of Sequential Operations
  head() tail() get(int) update(int, T) prepend(T) append(T)
io.vavr.collection.Arrayconstlinearconstlinearlinearlinear
io.vavr.collection.CharSeqconstlinearconstlinearlinearlinear
io.vavr.collection.Iteratorconstconst————
io.vavr.collection.Listconstconstlinearlinearconstlinear
io.vavr.collection.Queueconstconstalinearlinearconstconst
io.vavr.collection.PriorityQueueloglog——loglog
io.vavr.collection.Streamconstconstlinearlinearconstlazyconstlazy
io.vavr.collection.Vectorconsteffconsteffconsteffconsteffconsteffconsteff

Time Complexity of Map/Set Operations
  contains/Key add/put remove min
io.vavr.collection.HashMapconsteffconsteffconstefflinear
io.vavr.collection.HashSetconsteffconsteffconstefflinear
io.vavr.collection.LinkedHashMapconstefflinearlinearlinear
io.vavr.collection.LinkedHashSetconstefflinearlinearlinear
io.vavr.collection.Treeloglogloglog
io.vavr.collection.TreeMaploglogloglog
io.vavr.collection.TreeSetloglogloglog

Interface Summary

Modifier and TypeInterface and Description
pack-priv interface
pack-priv interface
ArrayType<T>

Helper to replace reflective array access.

public interface
BitSet<T>

An immutable BitSet implementation.

pack-priv interface
pack-priv interface
public interface
Foldable<
Component type of this foldable
T
>

Interface of foldable data structures.

pack-priv interface
pack-priv interface
public interface
IndexedSeq<
component type
T
>

Interface for immutable, indexed sequences.

pack-priv interface
public interface
Iterator<
Component type
T
>

io.vavr.collection.Iterator is a compositional replacement for java.util.Iterator whose purpose is to iterate once over a sequence of elements.

pack-priv interface
pack-priv interface
public interface
LinearSeq<
component type
T
>

Interface for immutable, linear sequences.

pack-priv interface
public interface
List<
Component type of the List
T
>

An immutable List is an eager sequence of elements.

pack-priv interface
public interface
Map<
Key type
K
,
Value type
V
>

An immutable Map interface.

public interface
Multimap<
Key type
K
,
Value type
V
>

An immutable Multimap interface.

pack-priv interface
public interface
Ordered<
Component type
T
>

An ordered collection interface.

pack-priv interface
RedBlackTree<
Component type
T
>

Purely functional Red/Black Tree, inspired by Kazu Yamamoto's Haskell implementation.

pack-priv interface
public interface
Seq<
Component type
T
>

Interface for immutable sequential data structures.

public interface
Set<
Component type
T
>

An immutable Set interface.

public interface
SortedMap<
Key type
K
,
Value type
V
>

An immutable SortedMap interface.

public interface
SortedMultimap<
Key type
K
,
Value type
V
>

An immutable SortedMultimap interface.

public interface
SortedSet<
Component type
T
>

An immutable SortedSet interface.

public interface
Stream<
component type of this Stream
T
>

An immutable Stream is lazy sequence of elements which may be infinitely long.

pack-priv interface
public interface
Traversable<
Component type
T
>

An interface for inherently recursive, multi-valued data structures.

pack-priv interface
public interface
Tree<
component type of this Tree
T
>

A general Tree interface.

pack-priv interface
TreeModule

Because the empty tree Empty cannot be a child of an existing tree, method implementations distinguish between the empty and non-empty case.

pack-priv interface

Annotation Summary

Modifier and TypeAnnotation and Description
pack-priv @interface

Class Summary

Modifier and TypeClass and Description
pack-priv abstract class
AbstractIterator<
Component type
T
>

Provides a common Object#toString() implementation.

pack-priv abstract class
AbstractMultimap<
Key type
K
,
Value type
V
,
Multimap type
M extends Multimap<K, V>
>

An Multimap implementation (not intended to be public).

pack-priv abstract class
AbstractQueue<T, Q extends AbstractQueue<T, Q>>

public class
Array<
Component type
T
>

Array is a Traversable wrapper for Object[] containing elements of type T.

pack-priv class
BitMappedTrie<T>

A `bit-mapped trie` is a very wide and shallow tree (for integer indices the depth will be `≤6`).

public class
CharSeq

The CharSeq (read: character sequence) collection essentially is a rich String wrapper having all operations we know from the functional Vavr collections.

pack-priv class
Collections

Internal class, containing helpers.

pack-priv class
Comparators

INTERNAL: Common Comparator related functions (not intended to be public).

public class
HashMap<K, V>

An immutable HashMap implementation based on a Hash array mapped trie (HAMT).

public class
HashMultimap<
Key type
K
,
Value type
V
>

A HashMap-based implementation of Multimap

public class
HashSet<
Component type
T
>

An immutable HashSet implementation.

pack-priv class
JavaConverters

THIS CLASS IS INTENDED TO BE USED INTERNALLY ONLY!

public class
LinkedHashMap<K, V>

An immutable LinkedHashMap implementation that has predictable (insertion-order) iteration.

public class
LinkedHashMultimap<
Key type
K
,
Value type
V
>

A LinkedHashMap-based implementation of Multimap

public class
LinkedHashSet<
Component type
T
>

An immutable HashSet implementation that has predictable (insertion-order) iteration.

pack-priv class
Maps

INTERNAL: Common Map functions (not intended to be public).

pack-priv class
Multimaps

INTERNAL: Common Multimap functions (not intended to be public).

pack-priv class
public class
PriorityQueue<T>

A PriorityQueue.

pack-priv class
public class
Queue<
Component type of the Queue
T
>

An immutable Queue stores elements allowing a first-in-first-out (FIFO) retrieval.

public class
TreeMap<
Key type
K
,
Value type
V
>

SortedMap implementation, backed by a Red/Black Tree.

public class
TreeMultimap<
Key type
K
,
Value type
V
>

A TreeMap-based implementation of Multimap

public class
TreeSet<
Component type
T
>

SortedSet implementation, backed by a Red/Black Tree.

public class
Vector<
Component type of the Vector.
T
>

Vector is the default Seq implementation that provides effectively constant time access to any element.