Package com.google.common.collect
Class ImmutableMapValues<K,V>
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- com.google.common.collect.ImmutableCollection<V>
-
- com.google.common.collect.ImmutableMapValues<K,V>
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Iterable<V>
,java.util.Collection<V>
@GwtCompatible(emulated=true) final class ImmutableMapValues<K,V> extends ImmutableCollection<V>
values()
implementation forImmutableMap
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
ImmutableMapValues.SerializedForm<V>
-
Nested classes/interfaces inherited from class com.google.common.collect.ImmutableCollection
ImmutableCollection.ArrayBasedBuilder<E>, ImmutableCollection.Builder<E>
-
-
Field Summary
Fields Modifier and Type Field Description private ImmutableMap<K,V>
map
-
Constructor Summary
Constructors Constructor Description ImmutableMapValues(ImmutableMap<K,V> map)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ImmutableList<V>
asList()
Returns anImmutableList
containing the same elements, in the same order, as this collection.boolean
contains(java.lang.Object object)
(package private) boolean
isPartialView()
Returnstrue
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()
-
Methods inherited from class com.google.common.collect.ImmutableCollection
add, addAll, clear, copyIntoArray, remove, removeAll, retainAll, toArray, toArray
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
map
private final ImmutableMap<K,V> map
-
-
Constructor Detail
-
ImmutableMapValues
ImmutableMapValues(ImmutableMap<K,V> map)
-
-
Method Detail
-
size
public int size()
-
iterator
public UnmodifiableIterator<V> iterator()
Description copied from class:ImmutableCollection
Returns an unmodifiable iterator across the elements in this collection.- Specified by:
iterator
in interfacejava.util.Collection<K>
- Specified by:
iterator
in interfacejava.lang.Iterable<K>
- Specified by:
iterator
in classImmutableCollection<V>
-
contains
public boolean contains(@Nullable java.lang.Object object)
- Specified by:
contains
in interfacejava.util.Collection<K>
- Specified by:
contains
in classImmutableCollection<V>
-
isPartialView
boolean isPartialView()
Description copied from class:ImmutableCollection
Returnstrue
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 whethercopyOf
implementations should make an explicit copy to avoid memory leaks.- Specified by:
isPartialView
in classImmutableCollection<V>
-
asList
public ImmutableList<V> asList()
Description copied from class:ImmutableCollection
Returns anImmutableList
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.
- Overrides:
asList
in classImmutableCollection<V>
-
writeReplace
@GwtIncompatible java.lang.Object writeReplace()
- Overrides:
writeReplace
in classImmutableCollection<V>
-
-