Top Description Inners Fields Constructors Methods
com.google.common.collect

pack-priv final Class FilteredKeySetMultimap<K extends @Nullable Object, V extends @Nullable Object>

extends FilteredKeyMultimap<K extends @Nullable Object, V extends @Nullable Object>
implements FilteredSetMultimap<K extends @Nullable Object, V extends @Nullable Object>
Class Inheritance
All Implemented Interfaces
com.google.common.collect.FilteredSetMultimap, com.google.common.collect.SetMultimap, com.google.common.collect.Multimap, com.google.common.collect.FilteredMultimap
Annotations
@GwtCompatible
@ElementTypesAreNonnullByDefault
Imports
com.google.common.annotations.GwtCompatible, com.google.common.base.Predicate, java.util.Map.Entry, .Set, javax.annotation.CheckForNull, org.checkerframework.checker.nullness.qual.Nullable

Implementation of Multimaps#filterKeys(SetMultimap, Predicate).
Author
Louis Wasserman

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv class

Field Summary

Inherited from com.google.common.collect.FilteredKeyMultimap:
keyPredicateunfiltered

Constructor Summary

AccessConstructor and Description
pack-priv
FilteredKeySetMultimap(SetMultimap<K, V> unfiltered, Predicate<? super K> keyPredicate)

Method Summary

Modifier and TypeMethod and Description
pack-priv Set<Map.Entry<K, V>>
public Set<Map.Entry<K, V>>
entries()

Overrides com.google.common.collect.AbstractMultimap.entries.

Implements com.google.common.collect.Multimap.entries, com.google.common.collect.SetMultimap.entries.

Returns a view collection of all key-value pairs contained in this multimap, as Entry instances.
public Set<V>
get(K key)

Overrides com.google.common.collect.FilteredKeyMultimap.get.

Implements com.google.common.collect.Multimap.get, com.google.common.collect.SetMultimap.get.

Returns a view collection of the values associated with key in this multimap, if any.
public Set<V>
public Set<V>
replaceValues(K key, Iterable<? extends V> values)

Overrides com.google.common.collect.AbstractMultimap.replaceValues.

Implements com.google.common.collect.Multimap.replaceValues, com.google.common.collect.SetMultimap.replaceValues.

Stores a collection of values with the same key, replacing any existing values for that key.
public SetMultimap<K, V>
Inherited from com.google.common.collect.FilteredKeyMultimap:
clearcontainsKeycreateAsMapcreateKeyscreateKeySetcreateValuesentryIteratorentryPredicatesizeunmodifiableEmptyCollection

Constructor Detail

FilteredKeySetMultimapback to summary
pack-priv FilteredKeySetMultimap(SetMultimap<K, V> unfiltered, Predicate<? super K> keyPredicate)

Method Detail

createEntriesback to summary
pack-priv Set<Map.Entry<K, V>> createEntries()

Overrides com.google.common.collect.FilteredKeyMultimap.createEntries.

Annotations
@Override
entriesback to summary
public Set<Map.Entry<K, V>> entries()

Overrides com.google.common.collect.AbstractMultimap.entries.

Implements com.google.common.collect.Multimap.entries, com.google.common.collect.SetMultimap.entries.

Doc from com.google.common.collect.SetMultimap.entries.

Returns a view collection of all key-value pairs contained in this multimap, as Entry instances.

Changes to the returned collection or the entries it contains will update the underlying multimap, and vice versa. However, adding to the returned collection is not possible.

Because a SetMultimap has unique values for a given key, this method returns a Set, instead of the java.util.Collection specified in the Multimap interface.

Annotations
@Override
getback to summary
public Set<V> get(K key)

Overrides com.google.common.collect.FilteredKeyMultimap.get.

Implements com.google.common.collect.Multimap.get, com.google.common.collect.SetMultimap.get.

Doc from com.google.common.collect.SetMultimap.get.

Returns a view collection of the values associated with key in this multimap, if any. Note that when containsKey(key) is false, this returns an empty collection, not null.

Changes to the returned collection will update the underlying multimap, and vice versa.

Because a SetMultimap has unique values for a given key, this method returns a Set, instead of the java.util.Collection specified in the Multimap interface.

Annotations
@Override
removeAllback to summary
public Set<V> removeAll(Object key)

Overrides com.google.common.collect.FilteredKeyMultimap.removeAll.

Implements com.google.common.collect.Multimap.removeAll, com.google.common.collect.SetMultimap.removeAll.

Doc from com.google.common.collect.SetMultimap.removeAll.

Removes all values associated with the key key.

Once this method returns, key will not be mapped to any values, so it will not appear in keySet(), asMap(), or any other views.

Because a SetMultimap has unique values for a given key, this method returns a Set, instead of the java.util.Collection specified in the Multimap interface.

Returns:Set<V>

Doc from com.google.common.collect.Multimap.removeAll.

the values that were removed (possibly empty). The returned collection may be modifiable, but updating it will have no effect on the multimap.

Annotations
@Override
replaceValuesback to summary
public Set<V> replaceValues(K key, Iterable<? extends V> values)

Overrides com.google.common.collect.AbstractMultimap.replaceValues.

Implements com.google.common.collect.Multimap.replaceValues, com.google.common.collect.SetMultimap.replaceValues.

Doc from com.google.common.collect.SetMultimap.replaceValues.

Stores a collection of values with the same key, replacing any existing values for that key.

If values is empty, this is equivalent to removeAll(key).

Because a SetMultimap has unique values for a given key, this method returns a Set, instead of the java.util.Collection specified in the Multimap interface.

Any duplicates in values will be stored in the multimap once.

Returns:Set<V>

Doc from com.google.common.collect.Multimap.replaceValues.

the collection of replaced values, or an empty collection if no values were previously associated with the key. The collection may be modifiable, but updating it will have no effect on the multimap.

Annotations
@Override
unfilteredback to summary
public SetMultimap<K, V> unfiltered()

Overrides com.google.common.collect.FilteredKeyMultimap.unfiltered.

Implements com.google.common.collect.FilteredSetMultimap.unfiltered, com.google.common.collect.FilteredMultimap.unfiltered.

Annotations
@Override
com.google.common.collect back to summary

pack-priv Class FilteredKeySetMultimap.EntrySet

extends FilteredKeyMultimap<K extends @Nullable Object, V extends @Nullable Object>.Entries
implements Set<Map.Entry<K extends @Nullable Object, V extends @Nullable Object>>
Class Inheritance
All Implemented Interfaces
java.util.Set, java.util.Collection, java.lang.Iterable

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public boolean
equals(Object
object to be compared for equality with this set
o
)

Overrides java.lang.Object.equals.

Implements java.util.Set.equals, java.util.Collection.equals.

Compares the specified object with this set for equality.
public int
hashCode()

Overrides java.lang.Object.hashCode.

Implements java.util.Set.hashCode, java.util.Collection.hashCode.

Returns the hash code value for this set.
Inherited from com.google.common.collect.FilteredKeyMultimap.Entries:
delegateremove

Constructor Detail

EntrySetback to summary
pack-priv EntrySet()

Method Detail

equalsback to summary
public boolean equals(Object o)

Overrides java.lang.Object.equals.

Implements java.util.Set.equals, java.util.Collection.equals.

Doc from java.util.Set.equals.

Compares the specified object with this set for equality. Returns true if the specified object is also a set, the two sets have the same size, and every member of the specified set is contained in this set (or equivalently, every member of this set is contained in the specified set). This definition ensures that the equals method works properly across different implementations of the set interface.

Parameters
o:Object

object to be compared for equality with this set

Returns:boolean

true if the specified object is equal to this set

Annotations
@Override
hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Implements java.util.Set.hashCode, java.util.Collection.hashCode.

Doc from java.util.Set.hashCode.

Returns the hash code value for this set. The hash code of a set is defined to be the sum of the hash codes of the elements in the set, where the hash code of a null element is defined to be zero. This ensures that s1.equals(s2) implies that s1.hashCode()==s2.hashCode() for any two sets s1 and s2, as required by the general contract of Object#hashCode.

Returns:int

the hash code value for this set

Annotations
@Override