java.io.Externalizable
, java.io.Serializable
, Multimap<K,V>
, MutableMultimap<K,V>
, MutableSetIterableMultimap<K,V>
, MutableSetMultimap<K,V>
, SetMultimap<K,V>
, UnsortedSetMultimap<K,V>
public final class UnifiedSetMultimap<K,V> extends AbstractMutableSetMultimap<K,V> implements java.io.Externalizable
Constructor | Description |
---|---|
UnifiedSetMultimap() |
|
UnifiedSetMultimap(java.lang.Iterable<Pair<K,V>> inputIterable) |
|
UnifiedSetMultimap(Multimap<? extends K,? extends V> multimap) |
|
UnifiedSetMultimap(Pair<K,V>... pairs) |
Modifier and Type | Method | Description |
---|---|---|
MutableSetMultimap<V,K> |
flip() |
Given a Multimap from Domain
-> Range return a multimap from Range -> Domain. |
UnifiedSetMultimap<K,V> |
newEmpty() |
Creates a new instance of the same implementation type, using the default capacity and growth parameters.
|
static <K,V> UnifiedSetMultimap<K,V> |
newMultimap() |
|
static <K,V> UnifiedSetMultimap<K,V> |
newMultimap(java.lang.Iterable<Pair<K,V>> inputIterable) |
|
static <K,V> UnifiedSetMultimap<K,V> |
newMultimap(Multimap<? extends K,? extends V> multimap) |
|
static <K,V> UnifiedSetMultimap<K,V> |
newMultimap(Pair<K,V>... pairs) |
|
UnifiedSetMultimap<K,V> |
rejectKeysMultiValues(Predicate2<? super K,? super java.lang.Iterable<V>> predicate) |
Returns all elements of the source multimap that don't satisfy the predicate.
|
UnifiedSetMultimap<K,V> |
rejectKeysValues(Predicate2<? super K,? super V> predicate) |
Returns all elements of the source multimap that don't satisfy the predicate.
|
UnifiedSetMultimap<K,V> |
selectKeysMultiValues(Predicate2<? super K,? super java.lang.Iterable<V>> predicate) |
Returns all elements of the source multimap that satisfies the predicate.
|
UnifiedSetMultimap<K,V> |
selectKeysValues(Predicate2<? super K,? super V> predicate) |
Returns all elements of the source multimap that satisfies the predicate.
|
collectKeyMultiValues, collectKeysValues, collectValues, containsKey, containsKeyAndValue, containsValue, equals, forEachKey, forEachKeyMultiValues, forEachKeyValue, forEachValue, hashCode, keyBag, keyMultiValuePairsView, keysView, keyValuePairsView, multiValuesView, notEmpty, rejectKeysMultiValues, rejectKeysValues, selectKeysMultiValues, selectKeysValues, toString, valuesView
clear, get, getIfAbsentPutAll, isEmpty, keySet, put, putAll, putAll, readExternal, remove, removeAll, replaceValues, size, sizeDistinct, toMap, toMap, writeExternal
asSynchronized, collectKeyMultiValues, collectKeysValues, collectValues, toImmutable, toMutable
collectKeyMultiValues, collectKeysValues, collectValues, containsKey, containsKeyAndValue, containsValue, equals, forEachKey, forEachKeyMultiValues, forEachKeyValue, forEachValue, hashCode, isEmpty, keyBag, keyMultiValuePairsView, keySet, keysView, keyValuePairsView, multiValuesView, notEmpty, rejectKeysMultiValues, rejectKeysValues, selectKeysMultiValues, selectKeysValues, size, sizeDistinct, toMap, toMap, valuesView
add, clear, put, putAll, putAll, putAllPairs, putAllPairs, remove
get, getIfAbsentPutAll, removeAll, replaceValues
public static <K,V> UnifiedSetMultimap<K,V> newMultimap(Multimap<? extends K,? extends V> multimap)
public static <K,V> UnifiedSetMultimap<K,V> newMultimap()
public static <K,V> UnifiedSetMultimap<K,V> newMultimap(Pair<K,V>... pairs)
public static <K,V> UnifiedSetMultimap<K,V> newMultimap(java.lang.Iterable<Pair<K,V>> inputIterable)
public UnifiedSetMultimap<K,V> newEmpty()
Multimap
newEmpty
in interface Multimap<K,V>
newEmpty
in interface MutableMultimap<K,V>
newEmpty
in interface MutableSetIterableMultimap<K,V>
newEmpty
in interface MutableSetMultimap<K,V>
newEmpty
in interface SetMultimap<K,V>
newEmpty
in interface UnsortedSetMultimap<K,V>
public MutableSetMultimap<V,K> flip()
Multimap
->
Range return a multimap from Range ->
Domain.flip
in interface Multimap<K,V>
flip
in interface MutableMultimap<K,V>
flip
in interface MutableSetIterableMultimap<K,V>
flip
in interface MutableSetMultimap<K,V>
flip
in interface SetMultimap<K,V>
public UnifiedSetMultimap<K,V> selectKeysValues(Predicate2<? super K,? super V> predicate)
Multimap
e.g. return multimap.selectKeysValues(new Predicate2<Integer, Person>() { public boolean accept(Integer age, Person person) { return (age >= 18) && (person.getAddress().getCity().equals("Metuchen")); } });
selectKeysValues
in interface Multimap<K,V>
selectKeysValues
in interface MutableMultimap<K,V>
selectKeysValues
in interface MutableSetIterableMultimap<K,V>
selectKeysValues
in interface MutableSetMultimap<K,V>
selectKeysValues
in interface SetMultimap<K,V>
selectKeysValues
in interface UnsortedSetMultimap<K,V>
predicate
- a Predicate2
to use as the select criteriaMultimap
, which contains elements as a result of the select criteriapublic UnifiedSetMultimap<K,V> rejectKeysValues(Predicate2<? super K,? super V> predicate)
Multimap
e.g. return multimap.rejectKeysValues(new Predicate2<Integer, Person>() { public boolean accept(Integer age, Person person) { return (age >= 18) && (person.getAddress().getCity().equals("Metuchen")); } });
rejectKeysValues
in interface Multimap<K,V>
rejectKeysValues
in interface MutableMultimap<K,V>
rejectKeysValues
in interface MutableSetIterableMultimap<K,V>
rejectKeysValues
in interface MutableSetMultimap<K,V>
rejectKeysValues
in interface SetMultimap<K,V>
rejectKeysValues
in interface UnsortedSetMultimap<K,V>
predicate
- a Predicate2
to use as the reject criteriaMultimap
, which contains elements that don't satisfy the predicate
public UnifiedSetMultimap<K,V> selectKeysMultiValues(Predicate2<? super K,? super java.lang.Iterable<V>> predicate)
Multimap
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); } });
selectKeysMultiValues
in interface Multimap<K,V>
selectKeysMultiValues
in interface MutableMultimap<K,V>
selectKeysMultiValues
in interface MutableSetIterableMultimap<K,V>
selectKeysMultiValues
in interface MutableSetMultimap<K,V>
selectKeysMultiValues
in interface SetMultimap<K,V>
selectKeysMultiValues
in interface UnsortedSetMultimap<K,V>
predicate
- a Predicate2
to use as the select criteriaMultimap
, which contains elements as a result of the select criteriapublic UnifiedSetMultimap<K,V> rejectKeysMultiValues(Predicate2<? super K,? super java.lang.Iterable<V>> predicate)
Multimap
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); } });
rejectKeysMultiValues
in interface Multimap<K,V>
rejectKeysMultiValues
in interface MutableMultimap<K,V>
rejectKeysMultiValues
in interface MutableSetIterableMultimap<K,V>
rejectKeysMultiValues
in interface MutableSetMultimap<K,V>
rejectKeysMultiValues
in interface SetMultimap<K,V>
rejectKeysMultiValues
in interface UnsortedSetMultimap<K,V>
predicate
- a Predicate2
to use as the reject criteriaMultimap
, which contains elements that don't satisfy the predicate
Copyright © 2004–2020. All rights reserved.