Package com.google.common.collect
Class ImmutableMapValues<K,V>
java.lang.Object
java.util.AbstractCollection<V>
com.google.common.collect.ImmutableCollection<V>
com.google.common.collect.ImmutableMapValues<K,V>
- All Implemented Interfaces:
Serializable,Iterable<V>,Collection<V>
values() implementation for ImmutableMap.-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class com.google.common.collect.ImmutableCollection
ImmutableCollection.Builder<E> -
Field Summary
FieldsFields inherited from class com.google.common.collect.ImmutableCollection
SPLITERATOR_CHARACTERISTICS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionasList()Returns anImmutableListcontaining the same elements, in the same order, as this collection.booleanvoid(package private) booleanReturnstrueif this immutable collection's implementation contains references to user-created objects that aren't accessible via this collection's methods.iterator()Returns an unmodifiable iterator across the elements in this collection.intsize()(package private) ObjectMethods inherited from class com.google.common.collect.ImmutableCollection
add, addAll, clear, copyIntoArray, internalArray, internalArrayEnd, internalArrayStart, remove, removeAll, removeIf, retainAll, toArray, toArrayMethods inherited from class java.util.AbstractCollection
containsAll, isEmpty, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
equals, hashCode, parallelStream, stream, toArray
-
Field Details
-
map
-
-
Constructor Details
-
ImmutableMapValues
ImmutableMapValues(ImmutableMap<K, V> map)
-
-
Method Details
-
size
public int size()- Specified by:
sizein interfaceCollection<K>- Specified by:
sizein classAbstractCollection<V>
-
iterator
Description copied from class:ImmutableCollectionReturns an unmodifiable iterator across the elements in this collection.- Specified by:
iteratorin interfaceCollection<K>- Specified by:
iteratorin interfaceIterable<K>- Specified by:
iteratorin classImmutableCollection<V>
-
spliterator
- Specified by:
spliteratorin interfaceCollection<K>- Specified by:
spliteratorin interfaceIterable<K>- Overrides:
spliteratorin classImmutableCollection<V>
-
contains
- Specified by:
containsin interfaceCollection<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
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
-
writeReplace
Object writeReplace()- Overrides:
writeReplacein classImmutableCollection<V>
-