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

pack-priv abstract Class ImmutableMapEntrySet<K, V>

extends ImmutableSet.CachingAsList<Map.Entry<K, V>>
Class Inheritance
Known Direct Subclasses
com.google.common.collect.ImmutableMapEntrySet.RegularEntrySet, com.google.common.collect.RegularImmutableBiMap.Inverse.InverseEntrySet
Annotations
@GwtCompatible
emulated:true
@ElementTypesAreNonnullByDefault
Imports
com.google.common.annotations.GwtCompatible, .GwtIncompatible, .J2ktIncompatible, java.io.InvalidObjectException, .ObjectInputStream, .Serializable, java.util.Map.Entry, .Spliterator, java.util.function.Consumer, javax.annotation.CheckForNull, org.checkerframework.checker.nullness.qual.Nullable

entrySet() implementation for ImmutableMap.
Authors
Jesse Wilson, Kevin Bourrillion

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
pack-priv static class

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public boolean
contains(Object
element whose presence in this set is to be tested
object
)

Implements abstract com.google.common.collect.ImmutableCollection.contains.

Implements java.util.Set.contains, java.util.Collection.contains.

Returns true if this set contains the specified element.
public int
hashCode()

Overrides com.google.common.collect.ImmutableSet.hashCode.

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

Returns the hash code value for this set.
pack-priv boolean
isHashCodeFast()

Overrides com.google.common.collect.ImmutableSet.isHashCodeFast.

Returns true if the hashCode() method runs quickly.
pack-priv boolean
isPartialView()

Implements abstract com.google.common.collect.ImmutableCollection.isPartialView.

Returns true if this immutable collection's implementation contains references to user-created objects that aren't accessible via this collection's methods.
pack-priv abstract ImmutableMap<K, V>
map()

private void
public int
size()

Implements abstract java.util.AbstractCollection.size.

Implements java.util.Set.size, java.util.Collection.size.

Returns the number of elements in this set (its cardinality).
pack-priv Object
Inherited from com.google.common.collect.ImmutableSet.CachingAsList:
asListcreateAsList

Constructor Detail

ImmutableMapEntrySetback to summary
pack-priv ImmutableMapEntrySet()

Method Detail

containsback to summary
public boolean contains(Object object)

Implements abstract com.google.common.collect.ImmutableCollection.contains.

Implements java.util.Set.contains, java.util.Collection.contains.

Doc from java.util.Set.contains.

Returns true if this set contains the specified element. More formally, returns true if and only if this set contains an element e such that Objects.equals(o, e).

Parameters
object:Object

element whose presence in this set is to be tested

Returns:boolean

true if this set contains the specified element

Annotations
@Override
hashCodeback to summary
public int hashCode()

Overrides com.google.common.collect.ImmutableSet.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
isHashCodeFastback to summary
pack-priv boolean isHashCodeFast()

Overrides com.google.common.collect.ImmutableSet.isHashCodeFast.

Doc from com.google.common.collect.ImmutableSet.isHashCodeFast.

Returns true if the hashCode() method runs quickly.

Annotations
@Override
@GwtIncompatible
isPartialViewback to summary
pack-priv boolean isPartialView()

Implements abstract com.google.common.collect.ImmutableCollection.isPartialView.

Doc from com.google.common.collect.ImmutableCollection.isPartialView.

Returns true if this immutable collection's implementation contains references to user-created objects that aren't accessible via this collection's methods. This is generally used to determine whether copyOf implementations should make an explicit copy to avoid memory leaks.

Annotations
@Override
mapback to summary
pack-priv abstract ImmutableMap<K, V> map()
readObjectback to summary
private void readObject(ObjectInputStream stream) throws InvalidObjectException

Hides com.google.common.collect.ImmutableSet.readObject.

Annotations
@GwtIncompatible
@J2ktIncompatible
sizeback to summary
public int size()

Implements abstract java.util.AbstractCollection.size.

Implements java.util.Set.size, java.util.Collection.size.

Doc from java.util.Set.size.

Returns the number of elements in this set (its cardinality). If this set contains more than Integer.MAX_VALUE elements, returns Integer.MAX_VALUE.

Returns:int

the number of elements in this set (its cardinality)

Annotations
@Override
writeReplaceback to summary
pack-priv Object writeReplace()

Overrides com.google.common.collect.ImmutableSet.CachingAsList.writeReplace.

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

private Class ImmutableMapEntrySet.EntrySetSerializedForm<K, V>

extends Object
implements Serializable
Class Inheritance
  • java.lang.Object
  • com.google.common.collect.ImmutableMapEntrySet.EntrySetSerializedForm
All Implemented Interfaces
java.io.Serializable
Annotations
@GwtIncompatible
@J2ktIncompatible

Field Summary

Modifier and TypeField and Description
pack-priv final ImmutableMap<K, V>
private static final long

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv Object
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

mapback to summary
pack-priv final ImmutableMap<K, V> map
serialVersionUIDback to summary
private static final long serialVersionUID

Constructor Detail

EntrySetSerializedFormback to summary
pack-priv EntrySetSerializedForm(ImmutableMap<K, V> map)

Method Detail

readResolveback to summary
pack-priv Object readResolve()
com.google.common.collect back to summary

pack-priv final Class ImmutableMapEntrySet.RegularEntrySet<K, V>

extends ImmutableMapEntrySet<K, V>
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final transient ImmutableList<Map.Entry<K, V>>
private final transient ImmutableMap<K, V>

Constructor Summary

AccessConstructor and Description
pack-priv
RegularEntrySet(ImmutableMap<K, V> map, Map.Entry<K, V>[] entries)

pack-priv
RegularEntrySet(ImmutableMap<K, V> map, ImmutableList<Map.Entry<K, V>> entries)

Method Summary

Modifier and TypeMethod and Description
pack-priv int
copyIntoArray(@Nullable Object[] dst, int offset)

pack-priv ImmutableList<Map.Entry<K, V>>
public void
forEach(Consumer<? super Map.Entry<K, V>>
The action to be performed for each element
action
)

Overrides default java.lang.Iterable.forEach.

Performs the given action for each element of the Iterable until all elements have been processed or the action throws an exception.
public UnmodifiableIterator<Map.Entry<K, V>>
iterator()

Implements abstract com.google.common.collect.ImmutableSet.iterator.

Implements java.util.Set.iterator, java.util.Collection.iterator.

Returns an iterator over the elements in this set.
pack-priv ImmutableMap<K, V>
public Spliterator<Map.Entry<K, V>>
spliterator()

Overrides com.google.common.collect.ImmutableCollection.spliterator.

Overrides default java.util.Set.spliterator, java.util.Collection.spliterator.

Creates a Spliterator over the elements in this set.
pack-priv Object
Inherited from com.google.common.collect.ImmutableMapEntrySet:
containshashCodeisHashCodeFastisPartialViewsize

Field Detail

entriesback to summary
private final transient ImmutableList<Map.Entry<K, V>> entries
mapback to summary
private final transient ImmutableMap<K, V> map

Constructor Detail

RegularEntrySetback to summary
pack-priv RegularEntrySet(ImmutableMap<K, V> map, Map.Entry<K, V>[] entries)
RegularEntrySetback to summary
pack-priv RegularEntrySet(ImmutableMap<K, V> map, ImmutableList<Map.Entry<K, V>> entries)

Method Detail

copyIntoArrayback to summary
pack-priv int copyIntoArray(@Nullable Object[] dst, int offset)
Annotations
@Override
@GwtIncompatible:not used in GWT
createAsListback to summary
pack-priv ImmutableList<Map.Entry<K, V>> createAsList()

Overrides com.google.common.collect.ImmutableSet.CachingAsList.createAsList.

Annotations
@Override
forEachback to summary
public void forEach(Consumer<? super Map.Entry<K, V>> action)

Overrides default java.lang.Iterable.forEach.

Doc from java.lang.Iterable.forEach.

Performs the given action for each element of the Iterable until all elements have been processed or the action throws an exception. Actions are performed in the order of iteration, if that order is specified. Exceptions thrown by the action are relayed to the caller.

The behavior of this method is unspecified if the action performs side-effects that modify the underlying source of elements, unless an overriding class has specified a concurrent modification policy.

Parameters
action:Consumer<? super Map.Entry<K, V>>

The action to be performed for each element

Annotations
@Override
iteratorback to summary
public UnmodifiableIterator<Map.Entry<K, V>> iterator()

Implements abstract com.google.common.collect.ImmutableSet.iterator.

Implements java.util.Set.iterator, java.util.Collection.iterator.

Doc from java.util.Set.iterator.

Returns an iterator over the elements in this set. The elements are returned in no particular order (unless this set is an instance of some class that provides a guarantee).

Returns:UnmodifiableIterator<Map.Entry<K, V>>

an iterator over the elements in this set

Annotations
@Override
mapback to summary
pack-priv ImmutableMap<K, V> map()

Implements abstract com.google.common.collect.ImmutableMapEntrySet.map.

Annotations
@Override
spliteratorback to summary
public Spliterator<Map.Entry<K, V>> spliterator()

Overrides com.google.common.collect.ImmutableCollection.spliterator.

Overrides default java.util.Set.spliterator, java.util.Collection.spliterator.

Doc from java.util.Set.spliterator.

Creates a Spliterator over the elements in this set.

The Spliterator reports Spliterator#DISTINCT. Implementations should document the reporting of additional characteristic values.

Returns:Spliterator<Map.Entry<K, V>>

a Spliterator over the elements in this set

Annotations
@Override
writeReplaceback to summary
pack-priv Object writeReplace()

Overrides com.google.common.collect.ImmutableMapEntrySet.writeReplace.

Annotations
@SuppressWarnings:RedundantOverride
@Override
@J2ktIncompatible
@GwtIncompatible