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.Builder<E>
Modifier and Type | Field and Description |
---|---|
private ImmutableMap<K,V> |
map |
SPLITERATOR_CHARACTERISTICS
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) |
void |
forEach(java.util.function.Consumer<? super V> action) |
(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() |
java.util.Spliterator<V> |
spliterator() |
add, addAll, clear, copyIntoArray, internalArray, internalArrayEnd, internalArrayStart, remove, removeAll, removeIf, retainAll, toArray, toArray, writeReplace
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 java.util.Spliterator<V> spliterator()
spliterator
in interface java.lang.Iterable<V>
spliterator
in interface java.util.Collection<V>
spliterator
in class ImmutableCollection<V>
public boolean contains(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>
public void forEach(java.util.function.Consumer<? super V> action)