public final class MultiReaderUnifiedSetMultimap<K,V> extends AbstractMutableSetMultimap<K,V> implements java.io.Externalizable
map, totalSize| Constructor and Description |
|---|
MultiReaderUnifiedSetMultimap() |
MultiReaderUnifiedSetMultimap(java.lang.Iterable<com.gs.collections.api.tuple.Pair<K,V>> inputIterable) |
MultiReaderUnifiedSetMultimap(com.gs.collections.api.multimap.Multimap<? extends K,? extends V> multimap) |
MultiReaderUnifiedSetMultimap(com.gs.collections.api.tuple.Pair<K,V>... pairs) |
| Modifier and Type | Method and Description |
|---|---|
protected com.gs.collections.api.set.MutableSet<V> |
createCollection()
Creates the collection of values for a single key.
|
protected com.gs.collections.api.map.MutableMap<K,com.gs.collections.api.set.MutableSet<V>> |
createMap() |
protected com.gs.collections.api.map.MutableMap<K,com.gs.collections.api.set.MutableSet<V>> |
createMapWithKeyCount(int keyCount) |
com.gs.collections.api.multimap.set.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(java.lang.Iterable<com.gs.collections.api.tuple.Pair<K,V>> inputIterable) |
static <K,V> MultiReaderUnifiedSetMultimap<K,V> |
newMultimap(com.gs.collections.api.multimap.Multimap<? extends K,? extends V> multimap) |
static <K,V> MultiReaderUnifiedSetMultimap<K,V> |
newMultimap(com.gs.collections.api.tuple.Pair<K,V>... pairs) |
UnifiedSetMultimap<K,V> |
rejectKeysMultiValues(com.gs.collections.api.block.predicate.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(com.gs.collections.api.block.predicate.Predicate2<? super K,? super V> predicate)
Returns all elements of the source multimap that don't satisfy the predicate.
|
UnifiedSetMultimap<K,V> |
selectKeysMultiValues(com.gs.collections.api.block.predicate.Predicate2<? super K,? super java.lang.Iterable<V>> predicate)
Returns all elements of the source multimap that satisfies the predicate.
|
UnifiedSetMultimap<K,V> |
selectKeysValues(com.gs.collections.api.block.predicate.Predicate2<? super K,? super V> predicate)
Returns all elements of the source multimap that satisfies the predicate.
|
collectKeysValues, collectValues, toImmutable, toMutableadd, addToTotalSize, clear, clearTotalSize, decrementTotalSize, get, getMap, incrementTotalSize, isEmpty, put, putAll, putAll, putAllPairs, readExternal, remove, removeAll, replaceValues, size, sizeDistinct, subtractFromTotalSize, toMap, toMap, writeExternalcollectKeysValues, collectValues, containsKey, containsKeyAndValue, containsValue, createCollectionBlock, equals, forEachKey, forEachKeyMultiValues, forEachKeyValue, forEachValue, hashCode, keyBag, keyMultiValuePairsView, keysView, keyValuePairsView, multiValuesView, notEmpty, rejectKeysMultiValues, rejectKeysValues, selectKeysMultiValues, selectKeysValues, toString, valuesViewclone, finalize, getClass, notify, notifyAll, wait, wait, waitget, removeAll, replaceValuesadd, clear, put, putAll, putAll, putAllPairs, removecollectKeysValues, collectValues, containsKey, containsKeyAndValue, containsValue, equals, forEachKey, forEachKeyMultiValues, forEachKeyValue, forEachValue, hashCode, isEmpty, keyBag, keyMultiValuePairsView, keysView, keyValuePairsView, multiValuesView, notEmpty, rejectKeysMultiValues, rejectKeysValues, selectKeysMultiValues, selectKeysValues, size, sizeDistinct, toMap, toMap, valuesViewpublic MultiReaderUnifiedSetMultimap()
public MultiReaderUnifiedSetMultimap(com.gs.collections.api.multimap.Multimap<? extends K,? extends V> multimap)
public MultiReaderUnifiedSetMultimap(com.gs.collections.api.tuple.Pair<K,V>... pairs)
public static <K,V> MultiReaderUnifiedSetMultimap<K,V> newMultimap()
public static <K,V> MultiReaderUnifiedSetMultimap<K,V> newMultimap(com.gs.collections.api.multimap.Multimap<? extends K,? extends V> multimap)
public static <K,V> MultiReaderUnifiedSetMultimap<K,V> newMultimap(com.gs.collections.api.tuple.Pair<K,V>... pairs)
public static <K,V> MultiReaderUnifiedSetMultimap<K,V> newMultimap(java.lang.Iterable<com.gs.collections.api.tuple.Pair<K,V>> inputIterable)
protected com.gs.collections.api.map.MutableMap<K,com.gs.collections.api.set.MutableSet<V>> createMap()
createMap in class AbstractMutableMultimap<K,V,com.gs.collections.api.set.MutableSet<V>>protected com.gs.collections.api.map.MutableMap<K,com.gs.collections.api.set.MutableSet<V>> createMapWithKeyCount(int keyCount)
createMapWithKeyCount in class AbstractMutableMultimap<K,V,com.gs.collections.api.set.MutableSet<V>>protected com.gs.collections.api.set.MutableSet<V> createCollection()
AbstractMultimap
Collections with weak, soft, or phantom references are not supported.
Each call to createCollection should create a new instance.
The returned collection class determines whether duplicate key-value pairs are allowed.
createCollection in class AbstractMultimap<K,V,com.gs.collections.api.set.MutableSet<V>>public MultiReaderUnifiedSetMultimap<K,V> newEmpty()
com.gs.collections.api.multimap.MultimapnewEmpty in interface com.gs.collections.api.multimap.Multimap<K,V>newEmpty in interface com.gs.collections.api.multimap.MutableMultimap<K,V>newEmpty in interface com.gs.collections.api.multimap.set.MutableSetIterableMultimap<K,V>newEmpty in interface com.gs.collections.api.multimap.set.MutableSetMultimap<K,V>newEmpty in interface com.gs.collections.api.multimap.set.SetMultimap<K,V>newEmpty in interface com.gs.collections.api.multimap.set.UnsortedSetMultimap<K,V>public com.gs.collections.api.multimap.set.MutableSetMultimap<V,K> flip()
com.gs.collections.api.multimap.Multimapflip in interface com.gs.collections.api.multimap.Multimap<K,V>flip in interface com.gs.collections.api.multimap.MutableMultimap<K,V>flip in interface com.gs.collections.api.multimap.set.MutableSetIterableMultimap<K,V>flip in interface com.gs.collections.api.multimap.set.MutableSetMultimap<K,V>flip in interface com.gs.collections.api.multimap.set.SetMultimap<K,V>public UnifiedSetMultimap<K,V> selectKeysValues(com.gs.collections.api.block.predicate.Predicate2<? super K,? super V> predicate)
com.gs.collections.api.multimap.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 com.gs.collections.api.multimap.Multimap<K,V>selectKeysValues in interface com.gs.collections.api.multimap.MutableMultimap<K,V>selectKeysValues in interface com.gs.collections.api.multimap.set.MutableSetIterableMultimap<K,V>selectKeysValues in interface com.gs.collections.api.multimap.set.MutableSetMultimap<K,V>selectKeysValues in interface com.gs.collections.api.multimap.set.SetMultimap<K,V>selectKeysValues in interface com.gs.collections.api.multimap.set.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(com.gs.collections.api.block.predicate.Predicate2<? super K,? super V> predicate)
com.gs.collections.api.multimap.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 com.gs.collections.api.multimap.Multimap<K,V>rejectKeysValues in interface com.gs.collections.api.multimap.MutableMultimap<K,V>rejectKeysValues in interface com.gs.collections.api.multimap.set.MutableSetIterableMultimap<K,V>rejectKeysValues in interface com.gs.collections.api.multimap.set.MutableSetMultimap<K,V>rejectKeysValues in interface com.gs.collections.api.multimap.set.SetMultimap<K,V>rejectKeysValues in interface com.gs.collections.api.multimap.set.UnsortedSetMultimap<K,V>predicate - a Predicate2 to use as the reject criteriaMultimap, which contains elements that don't satisfy the predicatepublic UnifiedSetMultimap<K,V> selectKeysMultiValues(com.gs.collections.api.block.predicate.Predicate2<? super K,? super java.lang.Iterable<V>> predicate)
com.gs.collections.api.multimap.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 com.gs.collections.api.multimap.Multimap<K,V>selectKeysMultiValues in interface com.gs.collections.api.multimap.MutableMultimap<K,V>selectKeysMultiValues in interface com.gs.collections.api.multimap.set.MutableSetIterableMultimap<K,V>selectKeysMultiValues in interface com.gs.collections.api.multimap.set.MutableSetMultimap<K,V>selectKeysMultiValues in interface com.gs.collections.api.multimap.set.SetMultimap<K,V>selectKeysMultiValues in interface com.gs.collections.api.multimap.set.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(com.gs.collections.api.block.predicate.Predicate2<? super K,? super java.lang.Iterable<V>> predicate)
com.gs.collections.api.multimap.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 com.gs.collections.api.multimap.Multimap<K,V>rejectKeysMultiValues in interface com.gs.collections.api.multimap.MutableMultimap<K,V>rejectKeysMultiValues in interface com.gs.collections.api.multimap.set.MutableSetIterableMultimap<K,V>rejectKeysMultiValues in interface com.gs.collections.api.multimap.set.MutableSetMultimap<K,V>rejectKeysMultiValues in interface com.gs.collections.api.multimap.set.SetMultimap<K,V>rejectKeysMultiValues in interface com.gs.collections.api.multimap.set.UnsortedSetMultimap<K,V>predicate - a Predicate2 to use as the reject criteriaMultimap, which contains elements that don't satisfy the predicate