K
- the type of the keys in the mapV
- the type of the values in the mappublic final class UnmodifiableEntrySet<K,V> extends AbstractSetDecorator<Map.Entry<K,V>> implements Unmodifiable
Set
to ensure it can't be altered.
Attempts to modify it will result in an UnsupportedOperationException.
Modifier and Type | Method and Description |
---|---|
boolean |
add(Map.Entry<K,V> object) |
boolean |
addAll(Collection<? extends Map.Entry<K,V>> coll) |
void |
clear() |
Iterator<Map.Entry<K,V>> |
iterator() |
boolean |
remove(Object object) |
boolean |
removeAll(Collection<?> coll) |
boolean |
removeIf(Predicate<? super Map.Entry<K,V>> filter) |
boolean |
retainAll(Collection<?> coll) |
Object[] |
toArray() |
<T> T[] |
toArray(T[] array) |
static <K,V> Set<Map.Entry<K,V>> |
unmodifiableEntrySet(Set<Map.Entry<K,V>> set)
Factory method to create an unmodifiable set of Map Entry objects.
|
decorated, equals, hashCode
contains, containsAll, isEmpty, setCollection, size, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
contains, containsAll, isEmpty, size, spliterator
parallelStream, stream
public static <K,V> Set<Map.Entry<K,V>> unmodifiableEntrySet(Set<Map.Entry<K,V>> set)
K
- the key typeV
- the value typeset
- the set to decorate, must not be nullNullPointerException
- if set is nullpublic boolean addAll(Collection<? extends Map.Entry<K,V>> coll)
public void clear()
public boolean remove(Object object)
public boolean removeIf(Predicate<? super Map.Entry<K,V>> filter)
removeIf
in interface Collection<Map.Entry<K,V>>
removeIf
in class AbstractCollectionDecorator<Map.Entry<K,V>>
public boolean removeAll(Collection<?> coll)
public boolean retainAll(Collection<?> coll)
public Object[] toArray()
Copyright © 2006–2022 Apache Software Foundation. All rights reserved.