@GwtCompatible(emulated=true) final class ImmutableMapValues<K,V> extends ImmutableCollection<V>
values()
implementation for ImmutableMap
.Modifier and Type | Class and Description |
---|---|
private static class |
ImmutableMapValues.SerializedForm<V> |
ImmutableCollection.ArrayBasedBuilder<E>, ImmutableCollection.Builder<E>
Modifier and Type | Field and Description |
---|---|
private ImmutableMap<K,V> |
map |
Constructor and Description |
---|
ImmutableMapValues(ImmutableMap<K,V> map) |
Modifier and Type | Method and Description |
---|---|
ImmutableList<V> |
asList()
Returns an
ImmutableList containing the same elements, in the same order, as this
collection. |
boolean |
contains(java.lang.Object object) |
(package private) boolean |
isPartialView()
Returns
true if this immutable collection's implementation contains references to
user-created objects that aren't accessible via this collection's methods. |
UnmodifiableIterator<V> |
iterator()
Returns an unmodifiable iterator across the elements in this collection.
|
int |
size() |
(package private) java.lang.Object |
writeReplace() |
add, addAll, clear, copyIntoArray, remove, removeAll, retainAll, toArray, toArray
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
private final ImmutableMap<K,V> map
ImmutableMapValues(ImmutableMap<K,V> map)
public int size()
public UnmodifiableIterator<V> iterator()
ImmutableCollection
iterator
in interface java.lang.Iterable<V>
iterator
in interface java.util.Collection<V>
iterator
in class ImmutableCollection<V>
public boolean contains(@Nullable java.lang.Object object)
contains
in interface java.util.Collection<V>
contains
in class ImmutableCollection<V>
boolean isPartialView()
ImmutableCollection
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.isPartialView
in class ImmutableCollection<V>
public ImmutableList<V> asList()
ImmutableCollection
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.
asList
in class ImmutableCollection<V>
@GwtIncompatible java.lang.Object writeReplace()
writeReplace
in class ImmutableCollection<V>