| Modifier and Type | Field and Description |
|---|---|
| protected final MutableMultimap | |
| private final Object |
| Access | Constructor and Description |
|---|---|
| protected | |
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | add(Pair<? extends K, ? extends V> keyValuePair)
Overrides default org. Modification operation similar to put, however, takes the key-value pair as the input. |
| public void | |
| public <K2, V2, R extends MutableMultimap | collectKeyMultiValues(Function<? super K, ? extends K2> keyFunction, Function<? super V, ? extends V2> valueFunction, R target)
Implements org. Same as the collectKeyMultiValues method but uses the specified target multimap for the results. |
| public <K2, V2, R extends MutableMultimap | collectKeysValues(Function2<? super K, ? super V, Pair<K2, V2>> function, R target)
Implements org. Same as the collect method but uses the specified target multimap for the results. |
| public <V2, R extends MutableMultimap | collectValues(Function<? super V, ? extends V2> function, R target)
Implements org. Same as the collect method but uses the specified target multimap for the results. |
| public boolean | containsKey(Object key)
Implements org. Returns |
| public boolean | containsKeyAndValue(Object key, Object value)
Implements org. Returns |
| public boolean | containsValue(Object value)
Implements org. Returns |
| public boolean | equals(Object obj)
Overrides java. Implements org. Compares the specified object with this Multimap for equality. |
| public void | forEachKey(Procedure<? super K> procedure)
Implements org. Calls the |
| public void | forEachKeyMultiValues(Procedure2<? super K, ? super RichIterable<V>> procedure)
Implements org. Calls the |
| public void | forEachKeyValue(Procedure2<? super K, ? super V> procedure)
Implements org. Calls the |
| public void | forEachValue(Procedure<? super V> procedure)
Implements org. Calls the procedure with each value. |
| protected MutableMultimap | |
| protected Object | |
| public int | hashCode()
Overrides java. Implements org. Returns the hash code for this Multimap. |
| public boolean | isEmpty()
Implements org. Returns |
| public Bag | keyBag()
Implements org. Returns a |
| public RichIterable | keyMultiValuePairsView()
Implements org. Returns a lazy view of the pair of a key and a lazy view of the values mapped to that key. |
| public SetIterable | keySet()
Implements org. Returns an unmodifiable |
| public RichIterable | keysView()
Implements org. Returns a lazy view of the unique keys. |
| public RichIterable | keyValuePairsView()
Implements org. Returns a lazy view of all the key/value pairs. |
| public RichIterable | multiValuesView()
Implements org. Returns an unmodifiable view of all the values mapped to each key. |
| public boolean | notEmpty()
Implements org. Returns |
| public boolean | |
| public boolean | putAll(K key, Iterable<? extends V> values)
Implements org.
|
| public <KK extends K, VV extends V> boolean | putAll(Multimap<KK, VV> multimap)
Implements org.
|
| public boolean | putAllPairs(Pair<? extends K, ? extends V>... pairs)
Overrides default org.
|
| public boolean | putAllPairs(Iterable<? extends Pair<? extends K, ? extends V>> pairs)
Overrides default org.
|
| public <R extends MutableMultimap | rejectKeysMultiValues(Predicate2<? super K, ? super RichIterable<V>> predicate, R target)
Implements org. Same as the reject method but uses the specified target multimap for the results. |
| public <R extends MutableMultimap | rejectKeysValues(Predicate2<? super K, ? super V> predicate, R target)
Implements org. Same as the reject method but uses the specified target multimap for the results. |
| public boolean | remove(Object key, Object value)
Implements org.
|
| public <R extends MutableMultimap | selectKeysMultiValues(Predicate2<? super K, ? super RichIterable<V>> predicate, R target)
Implements org. Same as the select method but uses the specified target multimap for the results. |
| public <R extends MutableMultimap | selectKeysValues(Predicate2<? super K, ? super V> predicate, R target)
Implements org. Same as the select method but uses the specified target multimap for the results. |
| public int | size()
Implements org. Returns the number of key-value entry pairs. |
| public int | sizeDistinct()
Implements org. Returns the number of distinct keys. |
| public MutableMap | toMap()
Implements org. Returns a new |
| public <R extends Collection | toMap(Function0<R> collectionFactory)
Implements org. Returns a new |
| public String | |
| public RichIterable | valuesView()
Implements org. Returns a lazy flattened view of all the values. |
| public MutableMultimap | withKeyMultiValues(K key, V... values)
Overrides default org. Puts the key / values combination into the MutableMultimap and returns the MutableMultimap (this). |
| protected Object |
| delegate | back to summary |
|---|---|
| protected final MutableMultimap<K, V> delegate | |
| lock | back to summary |
|---|---|
| private final Object lock | |
| AbstractSynchronizedMultimap | back to summary |
|---|---|
| protected AbstractSynchronizedMultimap(MutableMultimap<K, V> multimap, Object newLock) | |
| AbstractSynchronizedMultimap | back to summary |
|---|---|
| protected AbstractSynchronizedMultimap(MutableMultimap<K, V> multimap) | |
| add | back to summary |
|---|---|
| public boolean add(Pair<? extends K, ? extends V> keyValuePair) Overrides default org. Doc from org. Modification operation similar to put, however, takes the key-value pair as the input.
| |
| clear | back to summary |
|---|---|
| public void clear() Implements org.
| |
| collectKeyMultiValues | back to summary |
|---|---|
| public <K2, V2, R extends MutableMultimap Implements org. Doc from org. Same as the collectKeyMultiValues method but uses the specified target multimap for the results. e.g. return multimap.collectKeyMultiValues(each -> each + 1, Person::getLastName, HashBagMultimap.<Integer, String>newMultimap());
| |
| collectKeysValues | back to summary |
|---|---|
| public <K2, V2, R extends MutableMultimap Implements org. Doc from org. Same as the collect method but uses the specified target multimap for the results. e.g.
return multimap.collectKeysValues(new Function2<Integer, Person, Pair<String, String>>()
{
public Pair<String, String> valueOf(Integer age, Person person)
{
return Tuples.pair(age.toString(), person.getLastName());
}
}, HashBagMultimap.<String, String>newMultimap());
| |
| collectValues | back to summary |
|---|---|
| public <V2, R extends MutableMultimap Implements org. Doc from org. Same as the collect method but uses the specified target multimap for the results. e.g.
return multimap.collectValues(new Function<Person, String>()
{
public String valueOf(Person person)
{
return person.getLastName();
}
}, FastListMultimap.<Integer, String>newMultimap());
| |
| containsKey | back to summary |
|---|---|
| public boolean containsKey(Object key) Implements org. Doc from org. Returns
| |
| containsKeyAndValue | back to summary |
|---|---|
| public boolean containsKeyAndValue(Object key, Object value) Implements org. Doc from org. Returns
| |
| containsValue | back to summary |
|---|---|
| public boolean containsValue(Object value) Implements org. Doc from org. Returns
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Overrides java. Implements org. Doc from org. Compares the specified object with this Multimap for equality. Two Multimaps are equal when their map views (as returned by In general, two Multimaps with identical key-value mappings may or may not be equal, depending on the type of the collections holding the values. If the backing collections are Sets, then two instances with the same key-value mappings are equal, but if the backing collections are Lists, equality depends on the ordering of the values for each key. Any two empty Multimaps are equal, because they both have empty
| |
| forEachKey | back to summary |
|---|---|
| public void forEachKey(Procedure<? super K> procedure) Implements org. Doc from org. Calls the Given a Multimap with the contents:
The given procedure would be invoked with the parameters:
| |
| forEachKeyMultiValues | back to summary |
|---|---|
| public void forEachKeyMultiValues(Procedure2<? super K, ? super RichIterable<V>> procedure) Implements org. Doc from org. Calls the Given a Multimap with the contents:
The given procedure would be invoked with the parameters:
| |
| forEachKeyValue | back to summary |
|---|---|
| public void forEachKeyValue(Procedure2<? super K, ? super V> procedure) Implements org. Doc from org. Calls the Given a Multimap with the contents:
The given procedure would be invoked with the parameters:
| |
| forEachValue | back to summary |
|---|---|
| public void forEachValue(Procedure<? super V> procedure) Implements org. Doc from org. Calls the procedure with each value. Given a Multimap with the contents:
| |
| getDelegate | back to summary |
|---|---|
| protected MutableMultimap | |
| getLock | back to summary |
|---|---|
| protected Object getLock() | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Implements org. Doc from org. Returns the hash code for this Multimap. The hash code of a Multimap is defined as the hash code of the map view, as returned by
| |
| isEmpty | back to summary |
|---|---|
| public boolean isEmpty() Implements org. Doc from org. Returns
| |
| keyBag | back to summary |
|---|---|
| public Bag Implements org. Doc from org. Returns a
| |
| keyMultiValuePairsView | back to summary |
|---|---|
| public RichIterable Implements org. Doc from org. Returns a lazy view of the pair of a key and a lazy view of the values mapped to that key.
| |
| keySet | back to summary |
|---|---|
| public SetIterable Implements org. Doc from org. Returns an unmodifiable
| |
| keysView | back to summary |
|---|---|
| public RichIterable Implements org. Doc from org. Returns a lazy view of the unique keys.
| |
| keyValuePairsView | back to summary |
|---|---|
| public RichIterable Implements org. Doc from org. Returns a lazy view of all the key/value pairs.
| |
| multiValuesView | back to summary |
|---|---|
| public RichIterable Implements org. Doc from org. Returns an unmodifiable view of all the values mapped to each key.
| |
| notEmpty | back to summary |
|---|---|
| public boolean notEmpty() Implements org. Doc from org. Returns
| |
| put | back to summary |
|---|---|
| public boolean put(K key, V value) Implements org.
| |
| putAll | back to summary |
|---|---|
| public boolean putAll(K key, Iterable<? extends V> values) Implements org.
| |
| putAll | back to summary |
|---|---|
| public <KK extends K, VV extends V> boolean putAll(Multimap<KK, VV> multimap) Implements org.
| |
| putAllPairs | back to summary |
|---|---|
| public boolean putAllPairs(Pair<? extends K, ? extends V>... pairs) Overrides default org.
| |
| putAllPairs | back to summary |
|---|---|
| public boolean putAllPairs(Iterable<? extends Pair<? extends K, ? extends V>> pairs) Overrides default org.
| |
| rejectKeysMultiValues | back to summary |
|---|---|
| public <R extends MutableMultimap Implements org. Doc from org. Same as the reject method but uses the specified target multimap for the results. e.g.
return multimap.rejectKeysMultiValues(new Predicate2<Integer, Iterable<Person>>()
{
public boolean accept(Integer age, Iterable<Person> values)
{
return (age >= 18)
&& ((RichIterable<Person>)values.size() >= 2);
}
}, FastListMultimap.newMultimap());
| |
| rejectKeysValues | back to summary |
|---|---|
| public <R extends MutableMultimap Implements org. Doc from org. Same as the reject method but uses the specified target multimap for the results. e.g.
return multimap.rejectKeysValues(new Predicate2<Integer, Person>()
{
public boolean accept(Integer age, Person person)
{
return (age >= 18)
&& (person.getAddress().getCity().equals("Metuchen"));
}
}, FastListMultimap.newMultimap());
| |
| remove | back to summary |
|---|---|
| public boolean remove(Object key, Object value) Implements org.
| |
| selectKeysMultiValues | back to summary |
|---|---|
| public <R extends MutableMultimap Implements org. Doc from org. Same as the select method but uses the specified target multimap for the results. e.g.
return multimap.selectKeysMultiValues(new Predicate2<Integer, Iterable<Person>>()
{
public boolean accept(Integer age, Iterable<Person> values)
{
return (age >= 18)
&& ((RichIterable<Person>)values.size() >= 2);
}
}, FastListMultimap.newMultimap());
| |
| selectKeysValues | back to summary |
|---|---|
| public <R extends MutableMultimap Implements org. Doc from org. Same as the select method but uses the specified target multimap for the results. e.g.
return multimap.selectKeysValues(new Predicate2<Integer, Person>()
{
public boolean accept(Integer age, Person person)
{
return (age >= 18)
&& (person.getAddress().getCity().equals("Metuchen"));
}
}, FastListMultimap.newMultimap());
| |
| size | back to summary |
|---|---|
| public int size() Implements org. Doc from org. Returns the number of key-value entry pairs. This method is implemented with O(1) (constant-time) performance.
| |
| sizeDistinct | back to summary |
|---|---|
| public int sizeDistinct() Implements org. Doc from org. Returns the number of distinct keys.
| |
| toMap | back to summary |
|---|---|
| public MutableMap Implements org. Doc from org. Returns a new
| |
| toMap | back to summary |
|---|---|
| public <R extends Collection Implements org. Doc from org. Returns a new
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |
| valuesView | back to summary |
|---|---|
| public RichIterable Implements org. Doc from org. Returns a lazy flattened view of all the values.
| |
| withKeyMultiValues | back to summary |
|---|---|
| public MutableMultimap Overrides default org. Doc from org. Puts the key / values combination into the MutableMultimap and returns the MutableMultimap (this).
| |
| writeReplace | back to summary |
|---|---|
| protected Object writeReplace() | |