Class AbstractMultimap<K,V,C extends RichIterable<V>>
java.lang.Object
org.eclipse.collections.impl.multimap.AbstractMultimap<K,V,C>
- All Implemented Interfaces:
Multimap<K,V>
- Direct Known Subclasses:
AbstractImmutableMultimap,AbstractMutableMultimap
public abstract class AbstractMultimap<K,V,C extends RichIterable<V>>
extends Object
implements Multimap<K,V>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<K2,V2, R extends MutableMultimap<K2, V2>>
RcollectKeyMultiValues(Function<? super K, ? extends K2> keyFunction, Function<? super V, ? extends V2> valueFunction, R target) <K2,V2, R extends MutableMultimap<K2, V2>>
RcollectKeysValues(Function2<? super K, ? super V, Pair<K2, V2>> function, R target) <V2,R extends MutableMultimap<K, V2>>
RcollectValues(Function<? super V, ? extends V2> function, R target) booleancontainsKey(Object key) booleancontainsKeyAndValue(Object key, Object value) booleancontainsValue(Object value) booleanvoidforEachKey(Procedure<? super K> procedure) voidforEachKeyMultiValues(Procedure2<? super K, ? super RichIterable<V>> procedure) voidforEachKeyValue(Procedure2<? super K, ? super V> procedure) voidforEachValue(Procedure<? super V> procedure) inthashCode()Returns the hash code for this multimap.keyBag()keysView()RichIterable<Pair<K,V>> booleannotEmpty()<R extends MutableMultimap<K,V>>
RrejectKeysMultiValues(Predicate2<? super K, ? super RichIterable<V>> predicate, R target) <R extends MutableMultimap<K,V>>
RrejectKeysValues(Predicate2<? super K, ? super V> predicate, R target) <R extends MutableMultimap<K,V>>
RselectKeysMultiValues(Predicate2<? super K, ? super RichIterable<V>> predicate, R target) <R extends MutableMultimap<K,V>>
RselectKeysValues(Predicate2<? super K, ? super V> predicate, R target) toString()Returns a string representation of the multimap, generated by callingtoStringon the map returned byMultimap.toMap().Methods inherited from interface org.eclipse.collections.api.multimap.Multimap
collectKeyMultiValues, collectKeysValues, collectValues, flip, get, isEmpty, keySet, newEmpty, rejectKeysMultiValues, rejectKeysValues, selectKeysMultiValues, selectKeysValues, size, sizeDistinct, toImmutable, toMap, toMap, toMutable
-
Constructor Details
-
AbstractMultimap
public AbstractMultimap()
-
-
Method Details
-
containsKey
- Specified by:
containsKeyin interfaceMultimap<K,V>
-
containsValue
- Specified by:
containsValuein interfaceMultimap<K,V>
-
containsKeyAndValue
- Specified by:
containsKeyAndValuein interfaceMultimap<K,V>
-
keysView
-
multiValuesView
- Specified by:
multiValuesViewin interfaceMultimap<K,V>
-
keyBag
-
valuesView
- Specified by:
valuesViewin interfaceMultimap<K,V>
-
keyMultiValuePairsView
- Specified by:
keyMultiValuePairsViewin interfaceMultimap<K,V>
-
keyValuePairsView
- Specified by:
keyValuePairsViewin interfaceMultimap<K,V>
-
equals
-
hashCode
public int hashCode()Returns the hash code for this multimap.The hash code of a multimap is defined as the hash code of the map view, as returned by
Multimap.toMap(). -
toString
Returns a string representation of the multimap, generated by callingtoStringon the map returned byMultimap.toMap(). -
notEmpty
public boolean notEmpty() -
forEachValue
- Specified by:
forEachValuein interfaceMultimap<K,V>
-
forEachKey
- Specified by:
forEachKeyin interfaceMultimap<K,V>
-
forEachKeyValue
- Specified by:
forEachKeyValuein interfaceMultimap<K,V>
-
forEachKeyMultiValues
- Specified by:
forEachKeyMultiValuesin interfaceMultimap<K,V>
-
selectKeysValues
public <R extends MutableMultimap<K,V>> R selectKeysValues(Predicate2<? super K, ? super V> predicate, R target) - Specified by:
selectKeysValuesin interfaceMultimap<K,V>
-
rejectKeysValues
public <R extends MutableMultimap<K,V>> R rejectKeysValues(Predicate2<? super K, ? super V> predicate, R target) - Specified by:
rejectKeysValuesin interfaceMultimap<K,V>
-
selectKeysMultiValues
public <R extends MutableMultimap<K,V>> R selectKeysMultiValues(Predicate2<? super K, ? super RichIterable<V>> predicate, R target) - Specified by:
selectKeysMultiValuesin interfaceMultimap<K,V>
-
rejectKeysMultiValues
public <R extends MutableMultimap<K,V>> R rejectKeysMultiValues(Predicate2<? super K, ? super RichIterable<V>> predicate, R target) - Specified by:
rejectKeysMultiValuesin interfaceMultimap<K,V>
-
collectKeysValues
public <K2,V2, R collectKeysValuesR extends MutableMultimap<K2, V2>> (Function2<? super K, ? super V, Pair<K2, V2>> function, R target) - Specified by:
collectKeysValuesin interfaceMultimap<K,V>
-
collectKeyMultiValues
public <K2,V2, R collectKeyMultiValuesR extends MutableMultimap<K2, V2>> (Function<? super K, ? extends K2> keyFunction, Function<? super V, ? extends V2> valueFunction, R target) - Specified by:
collectKeyMultiValuesin interfaceMultimap<K,V>
-
collectValues
public <V2,R extends MutableMultimap<K, R collectValuesV2>> (Function<? super V, ? extends V2> function, R target) - Specified by:
collectValuesin interfaceMultimap<K,V>
-