| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| 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 |
| protected abstract C | Returns: an empty collection of valuesCreates the collection of values for a single key. |
| protected Function | |
| public boolean | equals(Object object)
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 abstract MapIterable | |
| public int | hashCode()
Overrides java. Implements org. Returns the hash code for this multimap. |
| 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 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 <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 <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 String | Returns: a string representation of the multimapOverrides java. Returns a string representation of the multimap, generated by calling
|
| public RichIterable | valuesView()
Implements org. Returns a lazy flattened view of all the values. |
| AbstractMultimap | back to summary |
|---|---|
| public AbstractMultimap() | |
| 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
| |
| createCollection | back to summary |
|---|---|
| protected abstract C createCollection() Creates the collection of values for a single key.
Collections with weak, soft, or phantom references are not supported.
Each call to The returned collection class determines whether duplicate key-value pairs are allowed.
| |
| createCollectionBlock | back to summary |
|---|---|
| protected Function | |
| equals | back to summary |
|---|---|
| public boolean equals(Object object) 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:
| |
| getMap | back to summary |
|---|---|
| protected abstract MapIterable | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Implements 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
| |
| 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.
| |
| 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
| |
| 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());
| |
| 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());
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Returns a string representation of the multimap, generated by calling
| |
| valuesView | back to summary |
|---|---|
| public RichIterable Implements org. Doc from org. Returns a lazy flattened view of all the values.
| |
| Modifier and Type | Field and Description |
|---|---|
| private final K | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public Pair |
| key | back to summary |
|---|---|
| private final K key | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| KeyValuePairFunction | back to summary |
|---|---|
| private KeyValuePairFunction(K key) | |
| valueOf | back to summary |
|---|---|
| public Pair Implements org.
| |