public final class SynchronizedPutFastListMultimap<K,V> extends AbstractSynchronizedPutMultimap<K,V,com.gs.collections.api.list.MutableList<V>> implements com.gs.collections.api.multimap.list.MutableListMultimap<K,V>, java.io.Externalizable
map, totalSize| Constructor and Description |
|---|
SynchronizedPutFastListMultimap() |
SynchronizedPutFastListMultimap(int initialCapacity) |
SynchronizedPutFastListMultimap(java.lang.Iterable<com.gs.collections.api.tuple.Pair<K,V>> inputIterable) |
SynchronizedPutFastListMultimap(com.gs.collections.api.multimap.Multimap<? extends K,? extends V> multimap) |
SynchronizedPutFastListMultimap(com.gs.collections.api.tuple.Pair<K,V>... pairs) |
| Modifier and Type | Method and Description |
|---|---|
<K2,V2> HashBagMultimap<K2,V2> |
collectKeysValues(com.gs.collections.api.block.function.Function2<? super K,? super V,com.gs.collections.api.tuple.Pair<K2,V2>> function)
Returns a new multimap with the results of applying the specified function on each key and value of the source
multimap.
|
<V2> FastListMultimap<K,V2> |
collectValues(com.gs.collections.api.block.function.Function<? super V,? extends V2> function)
Returns a new multimap with the results of applying the specified function on each value of the source
multimap.
|
protected com.gs.collections.api.list.MutableList<V> |
createCollection()
Creates the collection of values for a single key.
|
com.gs.collections.api.multimap.bag.MutableBagMultimap<V,K> |
flip()
Given a Multimap from Domain -> Range return a multimap from Range -> Domain.
|
SynchronizedPutFastListMultimap<K,V> |
newEmpty()
Creates a new instance of the same implementation type, using the default capacity and growth parameters.
|
static <K,V> SynchronizedPutFastListMultimap<K,V> |
newMultimap() |
static <K,V> SynchronizedPutFastListMultimap<K,V> |
newMultimap(int initialCapacity,
float loadFactor,
int concurrencyLevel) |
static <K,V> SynchronizedPutFastListMultimap<K,V> |
newMultimap(java.lang.Iterable<com.gs.collections.api.tuple.Pair<K,V>> inputIterable) |
static <K,V> SynchronizedPutFastListMultimap<K,V> |
newMultimap(com.gs.collections.api.multimap.Multimap<? extends K,? extends V> multimap) |
static <K,V> SynchronizedPutFastListMultimap<K,V> |
newMultimap(com.gs.collections.api.tuple.Pair<K,V>... pairs) |
FastListMultimap<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.
|
FastListMultimap<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.
|
FastListMultimap<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.
|
FastListMultimap<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.
|
com.gs.collections.api.multimap.list.ImmutableListMultimap<K,V> |
toImmutable()
Returns an immutable copy of this Multimap if it is not already immutable.
|
com.gs.collections.api.multimap.list.MutableListMultimap<K,V> |
toMutable()
Returns a mutable copy of this Multimap.
|
addToTotalSize, clearTotalSize, createMap, createMapWithKeyCount, decrementTotalSize, incrementTotalSize, put, size, subtractFromTotalSizeadd, clear, get, getMap, isEmpty, putAll, putAll, putAllPairs, readExternal, remove, removeAll, replaceValues, sizeDistinct, 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, replaceValuescollectKeysValues, 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 SynchronizedPutFastListMultimap()
public SynchronizedPutFastListMultimap(int initialCapacity)
public SynchronizedPutFastListMultimap(com.gs.collections.api.multimap.Multimap<? extends K,? extends V> multimap)
public SynchronizedPutFastListMultimap(com.gs.collections.api.tuple.Pair<K,V>... pairs)
public static <K,V> SynchronizedPutFastListMultimap<K,V> newMultimap()
public static <K,V> SynchronizedPutFastListMultimap<K,V> newMultimap(int initialCapacity, float loadFactor, int concurrencyLevel)
public static <K,V> SynchronizedPutFastListMultimap<K,V> newMultimap(com.gs.collections.api.multimap.Multimap<? extends K,? extends V> multimap)
public static <K,V> SynchronizedPutFastListMultimap<K,V> newMultimap(com.gs.collections.api.tuple.Pair<K,V>... pairs)
public static <K,V> SynchronizedPutFastListMultimap<K,V> newMultimap(java.lang.Iterable<com.gs.collections.api.tuple.Pair<K,V>> inputIterable)
protected com.gs.collections.api.list.MutableList<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.list.MutableList<V>>public SynchronizedPutFastListMultimap<K,V> newEmpty()
com.gs.collections.api.multimap.MultimapnewEmpty in interface com.gs.collections.api.multimap.list.ListMultimap<K,V>newEmpty in interface com.gs.collections.api.multimap.list.MutableListMultimap<K,V>newEmpty 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.ordered.OrderedIterableMultimap<K,V>newEmpty in interface com.gs.collections.api.multimap.ordered.ReversibleIterableMultimap<K,V>public com.gs.collections.api.multimap.list.MutableListMultimap<K,V> toMutable()
com.gs.collections.api.multimap.Multimappublic com.gs.collections.api.multimap.list.ImmutableListMultimap<K,V> toImmutable()
com.gs.collections.api.multimap.Multimap
The returned Multimap will be Serializable if this Multimap is Serializable.
public com.gs.collections.api.multimap.bag.MutableBagMultimap<V,K> flip()
com.gs.collections.api.multimap.Multimapflip in interface com.gs.collections.api.multimap.list.ListMultimap<K,V>flip in interface com.gs.collections.api.multimap.list.MutableListMultimap<K,V>flip in interface com.gs.collections.api.multimap.Multimap<K,V>flip in interface com.gs.collections.api.multimap.MutableMultimap<K,V>public FastListMultimap<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.list.ListMultimap<K,V>selectKeysValues in interface com.gs.collections.api.multimap.list.MutableListMultimap<K,V>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.ordered.OrderedIterableMultimap<K,V>selectKeysValues in interface com.gs.collections.api.multimap.ordered.ReversibleIterableMultimap<K,V>predicate - a Predicate2 to use as the select criteriaMultimap, which contains elements as a result of the select criteriapublic FastListMultimap<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.list.ListMultimap<K,V>rejectKeysValues in interface com.gs.collections.api.multimap.list.MutableListMultimap<K,V>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.ordered.OrderedIterableMultimap<K,V>rejectKeysValues in interface com.gs.collections.api.multimap.ordered.ReversibleIterableMultimap<K,V>predicate - a Predicate2 to use as the reject criteriaMultimap, which contains elements that don't satisfy the predicatepublic FastListMultimap<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.list.ListMultimap<K,V>selectKeysMultiValues in interface com.gs.collections.api.multimap.list.MutableListMultimap<K,V>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.ordered.OrderedIterableMultimap<K,V>selectKeysMultiValues in interface com.gs.collections.api.multimap.ordered.ReversibleIterableMultimap<K,V>predicate - a Predicate2 to use as the select criteriaMultimap, which contains elements as a result of the select criteriapublic FastListMultimap<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.list.ListMultimap<K,V>rejectKeysMultiValues in interface com.gs.collections.api.multimap.list.MutableListMultimap<K,V>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.ordered.OrderedIterableMultimap<K,V>rejectKeysMultiValues in interface com.gs.collections.api.multimap.ordered.ReversibleIterableMultimap<K,V>predicate - a Predicate2 to use as the reject criteriaMultimap, which contains elements that don't satisfy the predicatepublic <K2,V2> HashBagMultimap<K2,V2> collectKeysValues(com.gs.collections.api.block.function.Function2<? super K,? super V,com.gs.collections.api.tuple.Pair<K2,V2>> function)
com.gs.collections.api.multimap.Multimap
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());
}
});
collectKeysValues in interface com.gs.collections.api.multimap.list.ListMultimap<K,V>collectKeysValues in interface com.gs.collections.api.multimap.list.MutableListMultimap<K,V>collectKeysValues in interface com.gs.collections.api.multimap.Multimap<K,V>collectKeysValues in interface com.gs.collections.api.multimap.MutableMultimap<K,V>collectKeysValues in interface com.gs.collections.api.multimap.ordered.OrderedIterableMultimap<K,V>function - a Function2 to use for transformationMultimap, which contains elements as a result of the transformationpublic <V2> FastListMultimap<K,V2> collectValues(com.gs.collections.api.block.function.Function<? super V,? extends V2> function)
com.gs.collections.api.multimap.Multimap
e.g.
return multimap.collectValues(new Function<Person, String>()
{
public String valueOf(Person person)
{
return person.getLastName();
}
});
collectValues in interface com.gs.collections.api.multimap.list.ListMultimap<K,V>collectValues in interface com.gs.collections.api.multimap.list.MutableListMultimap<K,V>collectValues in interface com.gs.collections.api.multimap.Multimap<K,V>collectValues in interface com.gs.collections.api.multimap.MutableMultimap<K,V>collectValues in interface com.gs.collections.api.multimap.ordered.OrderedIterableMultimap<K,V>collectValues in interface com.gs.collections.api.multimap.ordered.ReversibleIterableMultimap<K,V>function - a Function to use for transformationMultimap, which contains elements as a result of the transformation