public final class UnifiedSetWithHashingStrategyMultimap<K,V> extends AbstractMutableSetMultimap<K,V> implements java.io.Externalizable
map, totalSize| Constructor and Description |
|---|
UnifiedSetWithHashingStrategyMultimap()
Deprecated.
Empty default constructor used for serialization. Instantiating an UnifiedSetWithHashingStrategyMultimap with
this constructor will have a null hashingStrategy and throw NullPointerException when used.
|
UnifiedSetWithHashingStrategyMultimap(com.gs.collections.api.block.HashingStrategy<? super V> hashingStrategy) |
UnifiedSetWithHashingStrategyMultimap(com.gs.collections.api.block.HashingStrategy<? super V> hashingStrategy,
java.lang.Iterable<com.gs.collections.api.tuple.Pair<K,V>> inputIterable) |
UnifiedSetWithHashingStrategyMultimap(com.gs.collections.api.block.HashingStrategy<? super V> hashingStrategy,
com.gs.collections.api.multimap.Multimap<? extends K,? extends V> multimap) |
UnifiedSetWithHashingStrategyMultimap(com.gs.collections.api.block.HashingStrategy<? super V> hashingStrategy,
com.gs.collections.api.tuple.Pair<K,V>... pairs) |
UnifiedSetWithHashingStrategyMultimap(UnifiedSetWithHashingStrategyMultimap<K,V> multimap) |
| Modifier and Type | Method and Description |
|---|---|
protected UnifiedSetWithHashingStrategy<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.
|
com.gs.collections.api.block.HashingStrategy<? super V> |
getValueHashingStrategy() |
UnifiedSetWithHashingStrategyMultimap<K,V> |
newEmpty()
Creates a new instance of the same implementation type, using the default capacity and growth parameters.
|
static <K,V> UnifiedSetWithHashingStrategyMultimap<K,V> |
newMultimap(com.gs.collections.api.block.HashingStrategy<? super V> hashingStrategy) |
static <K,V> UnifiedSetWithHashingStrategyMultimap<K,V> |
newMultimap(com.gs.collections.api.block.HashingStrategy<? super V> hashingStrategy,
java.lang.Iterable<com.gs.collections.api.tuple.Pair<K,V>> inputIterable) |
static <K,V> UnifiedSetWithHashingStrategyMultimap<K,V> |
newMultimap(com.gs.collections.api.block.HashingStrategy<? super V> hashingStrategy,
com.gs.collections.api.multimap.Multimap<? extends K,? extends V> multimap) |
static <K,V> UnifiedSetWithHashingStrategyMultimap<K,V> |
newMultimap(com.gs.collections.api.block.HashingStrategy<? super V> hashingStrategy,
com.gs.collections.api.tuple.Pair<K,V>... pairs) |
static <K,V> UnifiedSetWithHashingStrategyMultimap<K,V> |
newMultimap(UnifiedSetWithHashingStrategyMultimap<K,V> multimap) |
void |
readExternal(java.io.ObjectInput in) |
UnifiedSetWithHashingStrategyMultimap<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.
|
UnifiedSetWithHashingStrategyMultimap<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.
|
UnifiedSetWithHashingStrategyMultimap<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.
|
UnifiedSetWithHashingStrategyMultimap<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.
|
void |
writeExternal(java.io.ObjectOutput out) |
collectKeysValues, collectValues, toImmutable, toMutableadd, addToTotalSize, clear, clearTotalSize, decrementTotalSize, get, getMap, incrementTotalSize, isEmpty, put, putAll, putAll, putAllPairs, remove, removeAll, replaceValues, size, sizeDistinct, subtractFromTotalSize, toMap, toMapcollectKeysValues, 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, valuesView@Deprecated public UnifiedSetWithHashingStrategyMultimap()
public UnifiedSetWithHashingStrategyMultimap(com.gs.collections.api.block.HashingStrategy<? super V> hashingStrategy)
public UnifiedSetWithHashingStrategyMultimap(UnifiedSetWithHashingStrategyMultimap<K,V> multimap)
public UnifiedSetWithHashingStrategyMultimap(com.gs.collections.api.block.HashingStrategy<? super V> hashingStrategy, com.gs.collections.api.multimap.Multimap<? extends K,? extends V> multimap)
public UnifiedSetWithHashingStrategyMultimap(com.gs.collections.api.block.HashingStrategy<? super V> hashingStrategy, com.gs.collections.api.tuple.Pair<K,V>... pairs)
public static <K,V> UnifiedSetWithHashingStrategyMultimap<K,V> newMultimap(UnifiedSetWithHashingStrategyMultimap<K,V> multimap)
public static <K,V> UnifiedSetWithHashingStrategyMultimap<K,V> newMultimap(com.gs.collections.api.block.HashingStrategy<? super V> hashingStrategy, com.gs.collections.api.multimap.Multimap<? extends K,? extends V> multimap)
public static <K,V> UnifiedSetWithHashingStrategyMultimap<K,V> newMultimap(com.gs.collections.api.block.HashingStrategy<? super V> hashingStrategy)
public static <K,V> UnifiedSetWithHashingStrategyMultimap<K,V> newMultimap(com.gs.collections.api.block.HashingStrategy<? super V> hashingStrategy, com.gs.collections.api.tuple.Pair<K,V>... pairs)
public static <K,V> UnifiedSetWithHashingStrategyMultimap<K,V> newMultimap(com.gs.collections.api.block.HashingStrategy<? super V> hashingStrategy, 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 UnifiedSetWithHashingStrategy<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 UnifiedSetWithHashingStrategyMultimap<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.block.HashingStrategy<? super V> getValueHashingStrategy()
public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
writeExternal in interface java.io.ExternalizablewriteExternal in class AbstractMutableMultimap<K,V,com.gs.collections.api.set.MutableSet<V>>java.io.IOExceptionpublic void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
readExternal in interface java.io.ExternalizablereadExternal in class AbstractMutableMultimap<K,V,com.gs.collections.api.set.MutableSet<V>>java.io.IOExceptionjava.lang.ClassNotFoundExceptionpublic 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 UnifiedSetWithHashingStrategyMultimap<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 UnifiedSetWithHashingStrategyMultimap<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 UnifiedSetWithHashingStrategyMultimap<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 UnifiedSetWithHashingStrategyMultimap<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