K - the key typeV - the value typepublic static class ImmutableMap.ValueCollection<K,V> extends ImmutableCollectionBase<ImmutableMap.MapEntry<K,V>,V> implements Collection<V>
Collection interface to provide a view of the values in the ImmutableMap.
It makes use of the same underlying array, but returns only the value portion of the ImmutableMap.MapEntry.| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(Object o)
Test whether the collection contains an element equal to the specified object (which may be
null). |
Iterator<V> |
iterator()
Return an
Iterator over the collection. |
Object[] |
toArray()
Create a copy of the collection in an array.
|
<T> T[] |
toArray(T[] a)
Return a copy of the collection, either in the supplied array (if it fits) or in a new array of the specified
type.
|
add, addAll, containsAll, remove, removeAll, retainAll, toStringclear, isEmpty, sizeclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitadd, addAll, clear, containsAll, equals, hashCode, isEmpty, parallelStream, remove, removeAll, removeIf, retainAll, size, spliterator, streampublic boolean contains(Object o)
null).contains in interface Collection<V>o - the valuetrue if the collection contains the objectpublic Object[] toArray()
toArray in interface Collection<V>public <T> T[] toArray(T[] a)
toArray in interface Collection<V>T - the type of the destination array itemsa - the destination arrayArrayStoreException - if the values in the map can't be stored in the destination arrayCopyright © 2021. All rights reserved.