public final class MultiReaderUnifiedSetMultimap<K,V> extends AbstractMutableSetMultimap<K,V> implements Externalizable
Constructor and Description |
---|
MultiReaderUnifiedSetMultimap() |
MultiReaderUnifiedSetMultimap(Iterable<Pair<K,V>> inputIterable) |
MultiReaderUnifiedSetMultimap(Multimap<? extends K,? extends V> multimap) |
MultiReaderUnifiedSetMultimap(Pair<K,V>... pairs) |
Modifier and Type | Method and Description |
---|---|
MutableSetMultimap<V,K> |
flip()
Given a Multimap from Domain -> Range return a multimap from Range -> Domain.
|
MultiReaderUnifiedSetMultimap<K,V> |
newEmpty()
Creates a new instance of the same implementation type, using the default capacity and growth parameters.
|
static <K,V> MultiReaderUnifiedSetMultimap<K,V> |
newMultimap() |
static <K,V> MultiReaderUnifiedSetMultimap<K,V> |
newMultimap(Iterable<Pair<K,V>> inputIterable) |
static <K,V> MultiReaderUnifiedSetMultimap<K,V> |
newMultimap(Multimap<? extends K,? extends V> multimap) |
static <K,V> MultiReaderUnifiedSetMultimap<K,V> |
newMultimap(Pair<K,V>... pairs) |
UnifiedSetMultimap<K,V> |
rejectKeysMultiValues(Predicate2<? super K,? super 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 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.
|
asSynchronized, collectKeysValues, collectValues, toImmutable, toMutable
clear, get, isEmpty, keySet, put, putAll, putAll, readExternal, remove, removeAll, replaceValues, size, sizeDistinct, toMap, toMap, writeExternal
collectKeysValues, collectValues, containsKey, containsKeyAndValue, containsValue, equals, forEachKey, forEachKeyMultiValues, forEachKeyValue, forEachValue, hashCode, keyBag, keyMultiValuePairsView, keysView, keyValuePairsView, multiValuesView, notEmpty, rejectKeysMultiValues, rejectKeysValues, selectKeysMultiValues, selectKeysValues, toString, valuesView
readExternal, writeExternal
get, removeAll, replaceValues
add, clear, put, putAll, putAll, putAllPairs, putAllPairs, remove
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
public MultiReaderUnifiedSetMultimap()
public MultiReaderUnifiedSetMultimap(Multimap<? extends K,? extends V> multimap)
public static <K,V> MultiReaderUnifiedSetMultimap<K,V> newMultimap()
public static <K,V> MultiReaderUnifiedSetMultimap<K,V> newMultimap(Multimap<? extends K,? extends V> multimap)
public static <K,V> MultiReaderUnifiedSetMultimap<K,V> newMultimap(Pair<K,V>... pairs)
public static <K,V> MultiReaderUnifiedSetMultimap<K,V> newMultimap(Iterable<Pair<K,V>> inputIterable)
public MultiReaderUnifiedSetMultimap<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
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 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 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–2016. All rights reserved.