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

pack-priv final Class ImmutableMapValues<K, V>

extends ImmutableCollection<V>
Class Inheritance
Annotations
@GwtCompatible
emulated:true
@ElementTypesAreNonnullByDefault
Static Imports
com.google.common.base.Preconditions.checkNotNull

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

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private final ImmutableMap<K, V>
Inherited from com.google.common.collect.ImmutableCollection:
SPLITERATOR_CHARACTERISTICS

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public ImmutableList<V>
asList()

Overrides com.google.common.collect.ImmutableCollection.asList.

Returns an ImmutableList containing the same elements, in the same order, as this collection.
public boolean
contains(Object
element whose presence in this collection is to be tested
object
)

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

Implements java.util.Collection.contains.

Returns true if this collection contains the specified element.
public void
forEach(Consumer<? super 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.
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.
public UnmodifiableIterator<V>
iterator()

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

Implements java.util.Collection.iterator.

Returns an unmodifiable iterator across the elements in this collection.
public int
size()

Implements abstract java.util.AbstractCollection.size.

Implements java.util.Collection.size.

Returns the number of elements in this collection.
public Spliterator<V>
spliterator()

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

Overrides default java.util.Collection.spliterator.

Creates a Spliterator over the elements in this collection.
pack-priv Object
Inherited from com.google.common.collect.ImmutableCollection:
addaddAllclearcopyIntoArrayinternalArrayinternalArrayEndinternalArrayStartremoveremoveAllremoveIfretainAlltoArraytoArray

Field Detail

mapback to summary
private final ImmutableMap<K, V> map

Constructor Detail

ImmutableMapValuesback to summary
pack-priv ImmutableMapValues(ImmutableMap<K, V> map)

Method Detail

asListback to summary
public ImmutableList<V> asList()

Overrides com.google.common.collect.ImmutableCollection.asList.

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

Returns an ImmutableList containing the same elements, in the same order, as this collection.

Performance note: in most cases this method can return quickly without actually copying anything. The exact circumstances under which the copy is performed are undefined and subject to change.

Annotations
@Override
containsback to summary
public boolean contains(Object object)

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

Implements java.util.Collection.contains.

Doc from java.util.AbstractCollection.contains.

Returns true if this collection contains the specified element. More formally, returns true if and only if this collection contains at least one element e such that Objects.equals(o, e).

Parameters
object:Object

Doc from java.util.Collection.contains.

element whose presence in this collection is to be tested

Returns:boolean

Doc from java.util.Collection.contains.

true if this collection contains the specified element

Annotations
@Override
forEachback to summary
public void forEach(Consumer<? super 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 V>

The action to be performed for each element

Annotations
@GwtIncompatible
@Override
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
iteratorback to summary
public UnmodifiableIterator<V> iterator()

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

Implements java.util.Collection.iterator.

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

Returns an unmodifiable iterator across the elements in this collection.

Returns:UnmodifiableIterator<V>

Doc from java.util.AbstractCollection.iterator.

an iterator over the elements contained in this collection

Annotations
@Override
sizeback to summary
public int size()

Implements abstract java.util.AbstractCollection.size.

Implements java.util.Collection.size.

Doc from java.util.Collection.size.

Returns the number of elements in this collection. If this collection contains more than Integer.MAX_VALUE elements, returns Integer.MAX_VALUE.

Returns:int

the number of elements in this collection

Annotations
@Override
spliteratorback to summary
public Spliterator<V> spliterator()

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

Overrides default java.util.Collection.spliterator.

Doc from java.util.Collection.spliterator.

Creates a Spliterator over the elements in this collection. Implementations should document characteristic values reported by the spliterator. Such characteristic values are not required to be reported if the spliterator reports Spliterator#SIZED and this collection contains no elements.

The default implementation should be overridden by subclasses that can return a more efficient spliterator. In order to preserve expected laziness behavior for the stream() and parallelStream() methods, spliterators should either have the characteristic of IMMUTABLE or CONCURRENT, or be late-binding. If none of these is practical, the overriding class should describe the spliterator's documented policy of binding and structural interference, and should override the stream() and parallelStream() methods to create streams using a Supplier of the spliterator, as in:

Stream<E> s = StreamSupport.stream(() -> spliterator(), spliteratorCharacteristics)

These requirements ensure that streams produced by the stream() and parallelStream() methods will reflect the contents of the collection as of initiation of the terminal stream operation.

Returns:Spliterator<V>

a Spliterator over the elements in this collection

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

Overrides com.google.common.collect.ImmutableCollection.writeReplace.

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

private Class ImmutableMapValues.SerializedForm<V>

extends Object
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Annotations
@GwtIncompatible
@J2ktIncompatible
@SuppressWarnings:unused

Field Summary

Modifier and TypeField and Description
pack-priv final ImmutableMap<?, 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<?, V> map
serialVersionUIDback to summary
private static final long serialVersionUID

Constructor Detail

SerializedFormback to summary
pack-priv SerializedForm(ImmutableMap<?, V> map)

Method Detail

readResolveback to summary
pack-priv Object readResolve()