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 |
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, removeIf, 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 removeAll(Collection<?> coll)
public boolean retainAll(Collection<?> coll)
Copyright © 2001–2018 The Apache Software Foundation. All rights reserved.