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 Constructor Description AbstractMultimap()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <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)booleanequals(Object object)voidforEachKey(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.Bag<K>keyBag()RichIterable<Pair<K,RichIterable<V>>>keyMultiValuePairsView()RichIterable<K>keysView()RichIterable<Pair<K,V>>keyValuePairsView()RichIterable<RichIterable<V>>multiValuesView()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)StringtoString()Returns a string representation of the multimap, generated by callingtoStringon the map returned byMultimap.toMap().RichIterable<V>valuesView()-
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
-
-
-
-
Method Detail
-
containsKey
public boolean containsKey(Object key)
- Specified by:
containsKeyin interfaceMultimap<K,V>
-
containsValue
public boolean containsValue(Object value)
- Specified by:
containsValuein interfaceMultimap<K,V>
-
containsKeyAndValue
public boolean containsKeyAndValue(Object key, Object value)
- Specified by:
containsKeyAndValuein interfaceMultimap<K,V>
-
multiValuesView
public RichIterable<RichIterable<V>> multiValuesView()
- Specified by:
multiValuesViewin interfaceMultimap<K,V>
-
valuesView
public RichIterable<V> valuesView()
- Specified by:
valuesViewin interfaceMultimap<K,V>
-
keyMultiValuePairsView
public RichIterable<Pair<K,RichIterable<V>>> keyMultiValuePairsView()
- Specified by:
keyMultiValuePairsViewin interfaceMultimap<K,V>
-
keyValuePairsView
public RichIterable<Pair<K,V>> keyValuePairsView()
- Specified by:
keyValuePairsViewin interfaceMultimap<K,V>
-
equals
public boolean equals(Object object)
-
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
public String toString()
Returns a string representation of the multimap, generated by callingtoStringon the map returned byMultimap.toMap().
-
forEachValue
public void forEachValue(Procedure<? super V> procedure)
- Specified by:
forEachValuein interfaceMultimap<K,V>
-
forEachKey
public void forEachKey(Procedure<? super K> procedure)
- Specified by:
forEachKeyin interfaceMultimap<K,V>
-
forEachKeyValue
public void forEachKeyValue(Procedure2<? super K,? super V> procedure)
- Specified by:
forEachKeyValuein interfaceMultimap<K,V>
-
forEachKeyMultiValues
public void forEachKeyMultiValues(Procedure2<? super K,? super RichIterable<V>> procedure)
- 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 extends MutableMultimap<K2,V2>> R collectKeysValues(Function2<? super K,? super V,Pair<K2,V2>> function, R target)
- Specified by:
collectKeysValuesin interfaceMultimap<K,V>
-
collectKeyMultiValues
public <K2,V2,R extends MutableMultimap<K2,V2>> R collectKeyMultiValues(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,V2>> R collectValues(Function<? super V,? extends V2> function, R target)
- Specified by:
collectValuesin interfaceMultimap<K,V>
-
-