Top Description Inners Fields Constructors Methods
io.vavr.collection

public final Class LinkedHashMultimap<K, V>

extends AbstractMultimap<K, V, LinkedHashMultimap<K, V>>
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Type Parameters
<K>
Key type
<V>
Value type
Imports
io.vavr.Tuple2, java.io.Serializable, java.util.ArrayList, .Comparator, .Objects, java.util.function.BiConsumer, .BinaryOperator, .Function, .Supplier, java.util.stream.Collector

A LinkedHashMap-based implementation of Multimap
Author
Ruslan Sennov

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
private static final long
Inherited from io.vavr.collection.AbstractMultimap:
backemptyContainer

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
protected <K2, V2> LinkedHashMultimap<K2, V2>
protected <K2, V2> LinkedHashMultimap<K2, V2>
protected <K2, V2> Map<K2, V2>
public boolean
isSequential()

Overrides default io.vavr.collection.Traversable.isSequential.

Checks if the elements of this Traversable appear in encounter order.

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

Returns:

the given multimap instance as narrowed type Multimap<K, V>.
narrow
(LinkedHashMultimap<? extends K, ? extends V>
A Map.
map
)

Narrows a widened HashMultimap<?

public static <V> LinkedHashMultimap.Builder<V>
public static <V> LinkedHashMultimap.Builder<V>
public static <V extends Comparable<?>> LinkedHashMultimap.Builder<V>
public static <V> LinkedHashMultimap.Builder<V>
withSortedSet(Comparator<? super V> comparator)

Inherited from io.vavr.collection.AbstractMultimap:
asMapbimapcontainsKeydistinctdistinctBydistinctBydropdropRightdropUntildropWhileequalsfilterfilterfilterKeysfilterValuesflatMapgetgetContainerTypegetOrElsegroupBygroupedhashCodeheadinitinitOptionisAsyncisEmptyisLazyiteratorkeySetlastmapmapValuesmergemergeorElseorElsepartitionpeekputputrejectrejectrejectKeysrejectValuesremoveremoveremoveAllremoveAllremoveKeysremoveValuesreplacereplacereplaceAllreplaceAllreplaceValueretainAllscansizeslideByslidingslidingspanstringPrefixtailtailOptiontaketakeRighttakeUntiltakeWhiletoJavaMaptoJavaMaptoStringvalues

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides io.vavr.collection.AbstractMultimap.serialVersionUID, io.vavr.collection.Multimap.serialVersionUID.

Constructor Detail

LinkedHashMultimapback to summary
private LinkedHashMultimap(Map<K, Traversable<V>> back, Multimap.ContainerType containerType, AbstractMultimap.SerializableSupplier<Traversable<?>> emptyContainer)

Method Detail

createFromMapback to summary
protected <K2, V2> LinkedHashMultimap<K2, V2> createFromMap(Map<K2, Traversable<V2>> back)

Implements abstract io.vavr.collection.AbstractMultimap.createFromMap.

Annotations
@Override
emptyInstanceback to summary
protected <K2, V2> LinkedHashMultimap<K2, V2> emptyInstance()

Implements abstract io.vavr.collection.AbstractMultimap.emptyInstance.

Annotations
@SuppressWarnings:unchecked
@Override
emptyMapSupplierback to summary
protected <K2, V2> Map<K2, V2> emptyMapSupplier()

Implements abstract io.vavr.collection.AbstractMultimap.emptyMapSupplier.

Annotations
@Override
isSequentialback to summary
public boolean isSequential()

Overrides default io.vavr.collection.Traversable.isSequential.

Doc from io.vavr.collection.Traversable.isSequential.

Checks if the elements of this Traversable appear in encounter order.

Returns:boolean

true, if the insertion order of elements is preserved, false otherwise.

Annotations
@Override
narrowback to summary
public static <K, V> LinkedHashMultimap<K, V> narrow(LinkedHashMultimap<? extends K, ? extends V> map)

Narrows a widened HashMultimap<? extends K, ? extends V> to HashMultimap<K, V> by performing a type safe-cast. This is eligible because immutable/read-only collections are covariant.

Parameters
<K>
Key type
<V>
Value type
map:LinkedHashMultimap<? extends K, ? extends V>

A Map.

Returns:LinkedHashMultimap<K, V>

the given multimap instance as narrowed type Multimap<K, V>.

Annotations
@SuppressWarnings:unchecked
withSeqback to summary
public static <V> LinkedHashMultimap.Builder<V> withSeq()
withSetback to summary
public static <V> LinkedHashMultimap.Builder<V> withSet()
withSortedSetback to summary
public static <V extends Comparable<?>> LinkedHashMultimap.Builder<V> withSortedSet()
withSortedSetback to summary
public static <V> LinkedHashMultimap.Builder<V> withSortedSet(Comparator<? super V> comparator)
io.vavr.collection back to summary

public Class LinkedHashMultimap.Builder<V>

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final Multimap.ContainerType
private final AbstractMultimap.SerializableSupplier<Traversable<?>>

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public <
The key type
K
,
The value type
V2 extends V
>
Collector<Tuple2<K, V2>, ArrayList<Tuple2<K, V2>>, Multimap<K, V2>>

Returns:

A LinkedHashMultimap Collector.
collector
()

Returns a Collector which may be used in conjunction with java.util.stream.Stream#collect(Collector) to obtain a LinkedHashMultimap.

public <
The key type
K
,
The value type
V2 extends V
>
LinkedHashMultimap<K, V2>

Returns:

A new empty LinkedHashMultimap.
empty
()

Returns the empty LinkedHashMultimap.

public <
The key type
K
,
The value type
V2 extends V
>
LinkedHashMultimap<K, V2>

Returns:

A LinkedHashMultimap of size n, where each element contains the result supplied by s.
fill
(int
The number of elements in the LinkedHashMultimap
n
,
Supplier<? extends Tuple2<? extends K, ? extends V2>>
The Supplier computing element values
s
)

Returns a LinkedHashMultimap containing n values supplied by a given Supplier s.

public <
The key type
K
,
The value type
V2 extends V
>
LinkedHashMultimap<K, V2>

Returns:

A LinkedHashMultimap of size 1, where each element contains n values of element._2.
fill
(int
The number of elements in the LinkedHashMultimap
n
,
Tuple2<? extends K, ? extends V2>
The element
element
)

Returns a LinkedHashMultimap containing n times the given element

public <
The key type
K
,
The value type
V2 extends V
>
LinkedHashMultimap<K, V2>

Returns:

A new Multimap containing the given entries
of
(K
A singleton map key.
key
,
V2
A singleton map value.
value
)

Creates a LinkedHashMultimap of the given key-value pair.

public <
The key type
K
,
The value type
V2 extends V
>
LinkedHashMultimap<K, V2>

Returns:

A new Multimap containing the given entries
of
(K
a key for the map
k1
,
V2
the value for k1
v1
,
K
a key for the map
k2
,
V2
the value for k2
v2
)

Creates a LinkedHashMultimap of the given list of key-value pairs.

public <
The key type
K
,
The value type
V2 extends V
>
LinkedHashMultimap<K, V2>

Returns:

A new Multimap containing the given entries
of
(K
a key for the map
k1
,
V2
the value for k1
v1
,
K
a key for the map
k2
,
V2
the value for k2
v2
,
K
a key for the map
k3
,
V2
the value for k3
v3
)

Creates a LinkedHashMultimap of the given list of key-value pairs.

public <
The key type
K
,
The value type
V2 extends V
>
LinkedHashMultimap<K, V2>

Returns:

A new Multimap containing the given entries
of
(K
a key for the map
k1
,
V2
the value for k1
v1
,
K
a key for the map
k2
,
V2
the value for k2
v2
,
K
a key for the map
k3
,
V2
the value for k3
v3
,
K
a key for the map
k4
,
V2
the value for k4
v4
)

Creates a LinkedHashMultimap of the given list of key-value pairs.

public <
The key type
K
,
The value type
V2 extends V
>
LinkedHashMultimap<K, V2>

Returns:

A new Multimap containing the given entries
of
(K
a key for the map
k1
,
V2
the value for k1
v1
,
K
a key for the map
k2
,
V2
the value for k2
v2
,
K
a key for the map
k3
,
V2
the value for k3
v3
,
K
a key for the map
k4
,
V2
the value for k4
v4
,
K
a key for the map
k5
,
V2
the value for k5
v5
)

Creates a LinkedHashMultimap of the given list of key-value pairs.

public <
The key type
K
,
The value type
V2 extends V
>
LinkedHashMultimap<K, V2>

Returns:

A new Multimap containing the given entries
of
(K
a key for the map
k1
,
V2
the value for k1
v1
,
K
a key for the map
k2
,
V2
the value for k2
v2
,
K
a key for the map
k3
,
V2
the value for k3
v3
,
K
a key for the map
k4
,
V2
the value for k4
v4
,
K
a key for the map
k5
,
V2
the value for k5
v5
,
K
a key for the map
k6
,
V2
the value for k6
v6
)

Creates a LinkedHashMultimap of the given list of key-value pairs.

public <
The key type
K
,
The value type
V2 extends V
>
LinkedHashMultimap<K, V2>

Returns:

A new Multimap containing the given entries
of
(K
a key for the map
k1
,
V2
the value for k1
v1
,
K
a key for the map
k2
,
V2
the value for k2
v2
,
K
a key for the map
k3
,
V2
the value for k3
v3
,
K
a key for the map
k4
,
V2
the value for k4
v4
,
K
a key for the map
k5
,
V2
the value for k5
v5
,
K
a key for the map
k6
,
V2
the value for k6
v6
,
K
a key for the map
k7
,
V2
the value for k7
v7
)

Creates a LinkedHashMultimap of the given list of key-value pairs.

public <
The key type
K
,
The value type
V2 extends V
>
LinkedHashMultimap<K, V2>

Returns:

A new Multimap containing the given entries
of
(K
a key for the map
k1
,
V2
the value for k1
v1
,
K
a key for the map
k2
,
V2
the value for k2
v2
,
K
a key for the map
k3
,
V2
the value for k3
v3
,
K
a key for the map
k4
,
V2
the value for k4
v4
,
K
a key for the map
k5
,
V2
the value for k5
v5
,
K
a key for the map
k6
,
V2
the value for k6
v6
,
K
a key for the map
k7
,
V2
the value for k7
v7
,
K
a key for the map
k8
,
V2
the value for k8
v8
)

Creates a LinkedHashMultimap of the given list of key-value pairs.

public <
The key type
K
,
The value type
V2 extends V
>
LinkedHashMultimap<K, V2>

Returns:

A new Multimap containing the given entries
of
(K
a key for the map
k1
,
V2
the value for k1
v1
,
K
a key for the map
k2
,
V2
the value for k2
v2
,
K
a key for the map
k3
,
V2
the value for k3
v3
,
K
a key for the map
k4
,
V2
the value for k4
v4
,
K
a key for the map
k5
,
V2
the value for k5
v5
,
K
a key for the map
k6
,
V2
the value for k6
v6
,
K
a key for the map
k7
,
V2
the value for k7
v7
,
K
a key for the map
k8
,
V2
the value for k8
v8
,
K
a key for the map
k9
,
V2
the value for k9
v9
)

Creates a LinkedHashMultimap of the given list of key-value pairs.

public <
The key type
K
,
The value type
V2 extends V
>
LinkedHashMultimap<K, V2>

Returns:

A new Multimap containing the given entries
of
(K
a key for the map
k1
,
V2
the value for k1
v1
,
K
a key for the map
k2
,
V2
the value for k2
v2
,
K
a key for the map
k3
,
V2
the value for k3
v3
,
K
a key for the map
k4
,
V2
the value for k4
v4
,
K
a key for the map
k5
,
V2
the value for k5
v5
,
K
a key for the map
k6
,
V2
the value for k6
v6
,
K
a key for the map
k7
,
V2
the value for k7
v7
,
K
a key for the map
k8
,
V2
the value for k8
v8
,
K
a key for the map
k9
,
V2
the value for k9
v9
,
K
a key for the map
k10
,
V2
the value for k10
v10
)

Creates a LinkedHashMultimap of the given list of key-value pairs.

public <
The key type
K
,
The value type
V2 extends V
>
LinkedHashMultimap<K, V2>

Returns:

A new LinkedHashMultimap containing the given entry.
of
(Tuple2<? extends K, ? extends V2>
A tuple containing the key-value pair.
entry
)

Creates a LinkedHashMultimap of the given key-value pair.

public <
The key type
K
,
The value type
V2 extends V
>
LinkedHashMultimap<K, V2>

Returns:

A new Multimap containing the given map entries
ofAll
(Map<? extends K, ? extends V2>
A map
map
)

Returns a LinkedHashMultimap, from a source java.util.Map.

public <
The stream element type
T
,
The key type
K
,
The value type
V2 extends V
>
LinkedHashMultimap<K, V2>

Returns:

A new Multimap
ofAll
(Stream<? extends T>
the source stream
stream
,
Function<? super T, ? extends K>
the key mapper
keyMapper
,
Function<? super T, ? extends V2>
the value mapper
valueMapper
)

Returns a LinkedHashMultimap, from entries mapped from stream.

public <
The stream element type
T
,
The key type
K
,
The value type
V2 extends V
>
LinkedHashMultimap<K, V2>

Returns:

A new Multimap
ofAll
(Stream<? extends T>
the source stream
stream
,
Function<? super T, Tuple2<? extends K, ? extends V2>>
the entry mapper
entryMapper
)

Returns a LinkedHashMultimap, from entries mapped from stream.

public <
The key type
K
,
The value type
V2 extends V
>
LinkedHashMultimap<K, V2>

Returns:

A new LinkedHashMultimap containing the given entries.
ofEntries
(Iterable<? extends Tuple2<? extends K, ? extends V2>>
Multimap entries
entries
)

Creates a LinkedHashMultimap of the given entries.

public final <
The key type
K
,
The value type
V2 extends V
>
LinkedHashMultimap<K, V2>

Returns:

A new LinkedHashMultimap containing the given entries.
ofEntries
(Tuple2<? extends K, ? extends V2>...
Multimap entries
entries
)

Creates a LinkedHashMultimap of the given entries.

public final <
The key type
K
,
The value type
V2 extends V
>
LinkedHashMultimap<K, V2>

Returns:

A new LinkedHashMultimap containing the given entries.
ofEntries
(Map.Entry<? extends K, ? extends V2>...
Multimap entries
entries
)

Creates a LinkedHashMultimap of the given entries.

public <
The key type
K
,
The value type
V2 extends V
>
LinkedHashMultimap<K, V2>

Returns:

A LinkedHashMultimap consisting of elements f(0),f(1), ..., f(n - 1)
tabulate
(int
The number of elements in the LinkedHashMultimap
n
,
Function<? super Integer, ? extends Tuple2<? extends K, ? extends V2>>
The Function computing element values
f
)

Returns a LinkedHashMultimap containing n values of a given Function f over a range of integer values from 0 to n - 1.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

containerTypeback to summary
private final Multimap.ContainerType containerType
emptyContainerback to summary
private final AbstractMultimap.SerializableSupplier<Traversable<?>> emptyContainer

Constructor Detail

Builderback to summary
private Builder(Multimap.ContainerType containerType, AbstractMultimap.SerializableSupplier<Traversable<?>> emptyContainer)

Method Detail

collectorback to summary
public <K, V2 extends V> Collector<Tuple2<K, V2>, ArrayList<Tuple2<K, V2>>, Multimap<K, V2>> collector()

Returns a Collector which may be used in conjunction with java.util.stream.Stream#collect(Collector) to obtain a LinkedHashMultimap.

Parameters
<K>
The key type
<V2>
The value type
Returns:Collector<Tuple2<K, V2>, ArrayList<Tuple2<K, V2>>, Multimap<K, V2>>

A LinkedHashMultimap Collector.

emptyback to summary
public <K, V2 extends V> LinkedHashMultimap<K, V2> empty()

Returns the empty LinkedHashMultimap.

Parameters
<K>
The key type
<V2>
The value type
Returns:LinkedHashMultimap<K, V2>

A new empty LinkedHashMultimap.

fillback to summary
public <K, V2 extends V> LinkedHashMultimap<K, V2> fill(int n, Supplier<? extends Tuple2<? extends K, ? extends V2>> s)

Returns a LinkedHashMultimap containing n values supplied by a given Supplier s.

Parameters
<K>
The key type
<V2>
The value type
n:int

The number of elements in the LinkedHashMultimap

s:Supplier<? extends Tuple2<? extends K, ? extends V2>>

The Supplier computing element values

Returns:LinkedHashMultimap<K, V2>

A LinkedHashMultimap of size n, where each element contains the result supplied by s.

Annotations
@SuppressWarnings:unchecked
Exceptions
NullPointerException:
if s is null
fillback to summary
public <K, V2 extends V> LinkedHashMultimap<K, V2> fill(int n, Tuple2<? extends K, ? extends V2> element)

Returns a LinkedHashMultimap containing n times the given element

Parameters
<K>
The key type
<V2>
The value type
n:int

The number of elements in the LinkedHashMultimap

element:Tuple2<? extends K, ? extends V2>

The element

Returns:LinkedHashMultimap<K, V2>

A LinkedHashMultimap of size 1, where each element contains n values of element._2.

Annotations
@SuppressWarnings:unchecked
ofback to summary
public <K, V2 extends V> LinkedHashMultimap<K, V2> of(K key, V2 value)

Creates a LinkedHashMultimap of the given key-value pair.

Parameters
<K>
The key type
<V2>
The value type
key:K

A singleton map key.

value:V2

A singleton map value.

Returns:LinkedHashMultimap<K, V2>

A new Multimap containing the given entries

ofback to summary
public <K, V2 extends V> LinkedHashMultimap<K, V2> of(K k1, V2 v1, K k2, V2 v2)

Creates a LinkedHashMultimap of the given list of key-value pairs.

Parameters
<K>
The key type
<V2>
The value type
k1:K

a key for the map

v1:V2

the value for k1

k2:K

a key for the map

v2:V2

the value for k2

Returns:LinkedHashMultimap<K, V2>

A new Multimap containing the given entries

ofback to summary
public <K, V2 extends V> LinkedHashMultimap<K, V2> of(K k1, V2 v1, K k2, V2 v2, K k3, V2 v3)

Creates a LinkedHashMultimap of the given list of key-value pairs.

Parameters
<K>
The key type
<V2>
The value type
k1:K

a key for the map

v1:V2

the value for k1

k2:K

a key for the map

v2:V2

the value for k2

k3:K

a key for the map

v3:V2

the value for k3

Returns:LinkedHashMultimap<K, V2>

A new Multimap containing the given entries

ofback to summary
public <K, V2 extends V> LinkedHashMultimap<K, V2> of(K k1, V2 v1, K k2, V2 v2, K k3, V2 v3, K k4, V2 v4)

Creates a LinkedHashMultimap of the given list of key-value pairs.

Parameters
<K>
The key type
<V2>
The value type
k1:K

a key for the map

v1:V2

the value for k1

k2:K

a key for the map

v2:V2

the value for k2

k3:K

a key for the map

v3:V2

the value for k3

k4:K

a key for the map

v4:V2

the value for k4

Returns:LinkedHashMultimap<K, V2>

A new Multimap containing the given entries

ofback to summary
public <K, V2 extends V> LinkedHashMultimap<K, V2> of(K k1, V2 v1, K k2, V2 v2, K k3, V2 v3, K k4, V2 v4, K k5, V2 v5)

Creates a LinkedHashMultimap of the given list of key-value pairs.

Parameters
<K>
The key type
<V2>
The value type
k1:K

a key for the map

v1:V2

the value for k1

k2:K

a key for the map

v2:V2

the value for k2

k3:K

a key for the map

v3:V2

the value for k3

k4:K

a key for the map

v4:V2

the value for k4

k5:K

a key for the map

v5:V2

the value for k5

Returns:LinkedHashMultimap<K, V2>

A new Multimap containing the given entries

ofback to summary
public <K, V2 extends V> LinkedHashMultimap<K, V2> of(K k1, V2 v1, K k2, V2 v2, K k3, V2 v3, K k4, V2 v4, K k5, V2 v5, K k6, V2 v6)

Creates a LinkedHashMultimap of the given list of key-value pairs.

Parameters
<K>
The key type
<V2>
The value type
k1:K

a key for the map

v1:V2

the value for k1

k2:K

a key for the map

v2:V2

the value for k2

k3:K

a key for the map

v3:V2

the value for k3

k4:K

a key for the map

v4:V2

the value for k4

k5:K

a key for the map

v5:V2

the value for k5

k6:K

a key for the map

v6:V2

the value for k6

Returns:LinkedHashMultimap<K, V2>

A new Multimap containing the given entries

ofback to summary
public <K, V2 extends V> LinkedHashMultimap<K, V2> of(K k1, V2 v1, K k2, V2 v2, K k3, V2 v3, K k4, V2 v4, K k5, V2 v5, K k6, V2 v6, K k7, V2 v7)

Creates a LinkedHashMultimap of the given list of key-value pairs.

Parameters
<K>
The key type
<V2>
The value type
k1:K

a key for the map

v1:V2

the value for k1

k2:K

a key for the map

v2:V2

the value for k2

k3:K

a key for the map

v3:V2

the value for k3

k4:K

a key for the map

v4:V2

the value for k4

k5:K

a key for the map

v5:V2

the value for k5

k6:K

a key for the map

v6:V2

the value for k6

k7:K

a key for the map

v7:V2

the value for k7

Returns:LinkedHashMultimap<K, V2>

A new Multimap containing the given entries

ofback to summary
public <K, V2 extends V> LinkedHashMultimap<K, V2> of(K k1, V2 v1, K k2, V2 v2, K k3, V2 v3, K k4, V2 v4, K k5, V2 v5, K k6, V2 v6, K k7, V2 v7, K k8, V2 v8)

Creates a LinkedHashMultimap of the given list of key-value pairs.

Parameters
<K>
The key type
<V2>
The value type
k1:K

a key for the map

v1:V2

the value for k1

k2:K

a key for the map

v2:V2

the value for k2

k3:K

a key for the map

v3:V2

the value for k3

k4:K

a key for the map

v4:V2

the value for k4

k5:K

a key for the map

v5:V2

the value for k5

k6:K

a key for the map

v6:V2

the value for k6

k7:K

a key for the map

v7:V2

the value for k7

k8:K

a key for the map

v8:V2

the value for k8

Returns:LinkedHashMultimap<K, V2>

A new Multimap containing the given entries

ofback to summary
public <K, V2 extends V> LinkedHashMultimap<K, V2> of(K k1, V2 v1, K k2, V2 v2, K k3, V2 v3, K k4, V2 v4, K k5, V2 v5, K k6, V2 v6, K k7, V2 v7, K k8, V2 v8, K k9, V2 v9)

Creates a LinkedHashMultimap of the given list of key-value pairs.

Parameters
<K>
The key type
<V2>
The value type
k1:K

a key for the map

v1:V2

the value for k1

k2:K

a key for the map

v2:V2

the value for k2

k3:K

a key for the map

v3:V2

the value for k3

k4:K

a key for the map

v4:V2

the value for k4

k5:K

a key for the map

v5:V2

the value for k5

k6:K

a key for the map

v6:V2

the value for k6

k7:K

a key for the map

v7:V2

the value for k7

k8:K

a key for the map

v8:V2

the value for k8

k9:K

a key for the map

v9:V2

the value for k9

Returns:LinkedHashMultimap<K, V2>

A new Multimap containing the given entries

ofback to summary
public <K, V2 extends V> LinkedHashMultimap<K, V2> of(K k1, V2 v1, K k2, V2 v2, K k3, V2 v3, K k4, V2 v4, K k5, V2 v5, K k6, V2 v6, K k7, V2 v7, K k8, V2 v8, K k9, V2 v9, K k10, V2 v10)

Creates a LinkedHashMultimap of the given list of key-value pairs.

Parameters
<K>
The key type
<V2>
The value type
k1:K

a key for the map

v1:V2

the value for k1

k2:K

a key for the map

v2:V2

the value for k2

k3:K

a key for the map

v3:V2

the value for k3

k4:K

a key for the map

v4:V2

the value for k4

k5:K

a key for the map

v5:V2

the value for k5

k6:K

a key for the map

v6:V2

the value for k6

k7:K

a key for the map

v7:V2

the value for k7

k8:K

a key for the map

v8:V2

the value for k8

k9:K

a key for the map

v9:V2

the value for k9

k10:K

a key for the map

v10:V2

the value for k10

Returns:LinkedHashMultimap<K, V2>

A new Multimap containing the given entries

ofback to summary
public <K, V2 extends V> LinkedHashMultimap<K, V2> of(Tuple2<? extends K, ? extends V2> entry)

Creates a LinkedHashMultimap of the given key-value pair. Returns a singleton LinkedHashMultimap, i.e. a LinkedHashMultimap of one entry.

Parameters
<K>
The key type
<V2>
The value type
entry:Tuple2<? extends K, ? extends V2>

A tuple containing the key-value pair.

Returns:LinkedHashMultimap<K, V2>

A new LinkedHashMultimap containing the given entry.

ofAllback to summary
public <K, V2 extends V> LinkedHashMultimap<K, V2> ofAll(Map<? extends K, ? extends V2> map)

Returns a LinkedHashMultimap, from a source java.util.Map.

Parameters
<K>
The key type
<V2>
The value type
map:Map<? extends K, ? extends V2>

A map

Returns:LinkedHashMultimap<K, V2>

A new Multimap containing the given map entries

ofAllback to summary
public <T, K, V2 extends V> LinkedHashMultimap<K, V2> ofAll(Stream<? extends T> stream, Function<? super T, ? extends K> keyMapper, Function<? super T, ? extends V2> valueMapper)

Returns a LinkedHashMultimap, from entries mapped from stream.

Parameters
<T>
The stream element type
<K>
The key type
<V2>
The value type
stream:Stream<? extends T>

the source stream

keyMapper:Function<? super T, ? extends K>

the key mapper

valueMapper:Function<? super T, ? extends V2>

the value mapper

Returns:LinkedHashMultimap<K, V2>

A new Multimap

ofAllback to summary
public <T, K, V2 extends V> LinkedHashMultimap<K, V2> ofAll(Stream<? extends T> stream, Function<? super T, Tuple2<? extends K, ? extends V2>> entryMapper)

Returns a LinkedHashMultimap, from entries mapped from stream.

Parameters
<T>
The stream element type
<K>
The key type
<V2>
The value type
stream:Stream<? extends T>

the source stream

entryMapper:Function<? super T, Tuple2<? extends K, ? extends V2>>

the entry mapper

Returns:LinkedHashMultimap<K, V2>

A new Multimap

ofEntriesback to summary
public <K, V2 extends V> LinkedHashMultimap<K, V2> ofEntries(Iterable<? extends Tuple2<? extends K, ? extends V2>> entries)

Creates a LinkedHashMultimap of the given entries.

Parameters
<K>
The key type
<V2>
The value type
entries:Iterable<? extends Tuple2<? extends K, ? extends V2>>

Multimap entries

Returns:LinkedHashMultimap<K, V2>

A new LinkedHashMultimap containing the given entries.

ofEntriesback to summary
public final <K, V2 extends V> LinkedHashMultimap<K, V2> ofEntries(Tuple2<? extends K, ? extends V2>... entries)

Creates a LinkedHashMultimap of the given entries.

Parameters
<K>
The key type
<V2>
The value type
entries:Tuple2<? extends K, ? extends V2>[]

Multimap entries

Returns:LinkedHashMultimap<K, V2>

A new LinkedHashMultimap containing the given entries.

Annotations
@SafeVarargs
ofEntriesback to summary
public final <K, V2 extends V> LinkedHashMultimap<K, V2> ofEntries(Map.Entry<? extends K, ? extends V2>... entries)

Creates a LinkedHashMultimap of the given entries.

Parameters
<K>
The key type
<V2>
The value type
entries:Map.Entry<? extends K, ? extends V2>[]

Multimap entries

Returns:LinkedHashMultimap<K, V2>

A new LinkedHashMultimap containing the given entries.

Annotations
@SafeVarargs
tabulateback to summary
public <K, V2 extends V> LinkedHashMultimap<K, V2> tabulate(int n, Function<? super Integer, ? extends Tuple2<? extends K, ? extends V2>> f)

Returns a LinkedHashMultimap containing n values of a given Function f over a range of integer values from 0 to n - 1.

Parameters
<K>
The key type
<V2>
The value type
n:int

The number of elements in the LinkedHashMultimap

f:Function<? super Integer, ? extends Tuple2<? extends K, ? extends V2>>

The Function computing element values

Returns:LinkedHashMultimap<K, V2>

A LinkedHashMultimap consisting of elements f(0),f(1), ..., f(n - 1)

Annotations
@SuppressWarnings:unchecked
Exceptions
NullPointerException:
if f is null