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

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

extends AbstractMapEntry<K extends @Nullable Object, V extends @Nullable Object>
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Known Direct Subclasses
com.google.common.collect.ImmutableMapEntry, com.google.common.collect.LinkedHashMultimap.ValueEntry, com.google.common.collect.HashBiMap.BiEntry
Annotations
@GwtCompatible
serializable:true
@ElementTypesAreNonnullByDefault
Imports
com.google.common.annotations.GwtCompatible, java.io.Serializable, org.checkerframework.checker.nullness.qual.Nullable

An immutable Map.Entry, used both by com.google.common.collect.Maps#immutableEntry(Object, Object) and by other parts of common.collect as a superclass.

Field Summary

Modifier and TypeField and Description
pack-priv final K
private static final long
pack-priv final V

Constructor Summary

AccessConstructor and Description
pack-priv
ImmutableEntry(K key, V value)

Method Summary

Modifier and TypeMethod and Description
public final K
getKey()

Implements abstract com.google.common.collect.AbstractMapEntry.getKey.

Implements java.util.Map.Entry.getKey.

Returns the key corresponding to this entry.
public final V
getValue()

Implements abstract com.google.common.collect.AbstractMapEntry.getValue.

Implements java.util.Map.Entry.getValue.

Returns the value corresponding to this entry.
public final V
setValue(V
new value to be stored in this entry
value
)

Overrides com.google.common.collect.AbstractMapEntry.setValue.

Implements java.util.Map.Entry.setValue.

Replaces the value corresponding to this entry with the specified value (optional operation).
Inherited from com.google.common.collect.AbstractMapEntry:
equalshashCodetoString

Field Detail

keyback to summary
pack-priv final K key
Annotations
@ParametricNullness
serialVersionUIDback to summary
private static final long serialVersionUID
valueback to summary
pack-priv final V value
Annotations
@ParametricNullness

Constructor Detail

ImmutableEntryback to summary
pack-priv ImmutableEntry(K key, V value)

Method Detail

getKeyback to summary
public final K getKey()

Implements abstract com.google.common.collect.AbstractMapEntry.getKey.

Implements java.util.Map.Entry.getKey.

Doc from java.util.Map.Entry.getKey.

Returns the key corresponding to this entry.

Returns:K

the key corresponding to this entry

Annotations
@Override
@ParametricNullness
getValueback to summary
public final V getValue()

Implements abstract com.google.common.collect.AbstractMapEntry.getValue.

Implements java.util.Map.Entry.getValue.

Doc from java.util.Map.Entry.getValue.

Returns the value corresponding to this entry. If the mapping has been removed from the backing map (by the iterator's remove operation), the results of this call are undefined.

Returns:V

the value corresponding to this entry

Annotations
@Override
@ParametricNullness
setValueback to summary
public final V setValue(V value)

Overrides com.google.common.collect.AbstractMapEntry.setValue.

Implements java.util.Map.Entry.setValue.

Doc from java.util.Map.Entry.setValue.

Replaces the value corresponding to this entry with the specified value (optional operation). (Writes through to the map.) The behavior of this call is undefined if the mapping has already been removed from the map (by the iterator's remove operation).

Parameters
value:V

new value to be stored in this entry

Returns:V

old value corresponding to the entry

Annotations
@Override
@ParametricNullness