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 classImmutableMapValues.SerializedForm<V>-
Nested classes/interfaces inherited from class com.google.common.collect.ImmutableCollection
ImmutableCollection.Builder<E>
-
-
Field Summary
Fields Modifier and Type Field Description private ImmutableMap<K,V>map-
Fields inherited from class com.google.common.collect.ImmutableCollection
SPLITERATOR_CHARACTERISTICS
-
-
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 anImmutableListcontaining the same elements, in the same order, as this collection.booleancontains(java.lang.Object object)voidforEach(java.util.function.Consumer<? super V> action)(package private) booleanisPartialView()Returnstrueif 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.intsize()java.util.Spliterator<V>spliterator()(package private) java.lang.ObjectwriteReplace()-
Methods inherited from class com.google.common.collect.ImmutableCollection
add, addAll, clear, copyIntoArray, internalArray, internalArrayEnd, internalArrayStart, remove, removeAll, removeIf, retainAll, toArray, toArray
-
-
-
-
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:ImmutableCollectionReturns an unmodifiable iterator across the elements in this collection.- Specified by:
iteratorin interfacejava.util.Collection<K>- Specified by:
iteratorin interfacejava.lang.Iterable<K>- Specified by:
iteratorin classImmutableCollection<V>
-
spliterator
public java.util.Spliterator<V> spliterator()
- Specified by:
spliteratorin interfacejava.util.Collection<K>- Specified by:
spliteratorin interfacejava.lang.Iterable<K>- Overrides:
spliteratorin classImmutableCollection<V>
-
contains
public boolean contains(java.lang.Object object)
- Specified by:
containsin interfacejava.util.Collection<K>- Specified by:
containsin classImmutableCollection<V>
-
isPartialView
boolean isPartialView()
Description copied from class:ImmutableCollectionReturnstrueif 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 whethercopyOfimplementations should make an explicit copy to avoid memory leaks.- Specified by:
isPartialViewin classImmutableCollection<V>
-
asList
public ImmutableList<V> asList()
Description copied from class:ImmutableCollectionReturns anImmutableListcontaining 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:
asListin classImmutableCollection<V>
-
forEach
@GwtIncompatible public void forEach(java.util.function.Consumer<? super V> action)
-
writeReplace
@GwtIncompatible java.lang.Object writeReplace()
- Overrides:
writeReplacein classImmutableCollection<V>
-
-