Unmodifiable
public final class UnmodifiableEntrySet<K,V> extends AbstractSetDecorator<java.util.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 | Description |
---|---|---|
boolean |
add(java.util.Map.Entry<K,V> object) |
|
boolean |
addAll(java.util.Collection<? extends java.util.Map.Entry<K,V>> coll) |
|
void |
clear() |
|
java.util.Iterator<java.util.Map.Entry<K,V>> |
iterator() |
|
boolean |
remove(java.lang.Object object) |
|
boolean |
removeAll(java.util.Collection<?> coll) |
|
boolean |
retainAll(java.util.Collection<?> coll) |
|
java.lang.Object[] |
toArray() |
|
<T> T[] |
toArray(T[] array) |
|
static <K,V> java.util.Set<java.util.Map.Entry<K,V>> |
unmodifiableEntrySet(java.util.Set<java.util.Map.Entry<K,V>> set) |
Factory method to create an unmodifiable set of Map Entry objects.
|
contains, containsAll, isEmpty, setCollection, size, toString
decorated, equals, hashCode
public static <K,V> java.util.Set<java.util.Map.Entry<K,V>> unmodifiableEntrySet(java.util.Set<java.util.Map.Entry<K,V>> set)
K
- the key typeV
- the value typeset
- the set to decorate, must not be nulljava.lang.NullPointerException
- if set is nullpublic boolean add(java.util.Map.Entry<K,V> object)
add
in class AbstractCollectionDecorator<java.util.Map.Entry<K,V>>
public boolean addAll(java.util.Collection<? extends java.util.Map.Entry<K,V>> coll)
addAll
in class AbstractCollectionDecorator<java.util.Map.Entry<K,V>>
public void clear()
clear
in class AbstractCollectionDecorator<java.util.Map.Entry<K,V>>
public boolean remove(java.lang.Object object)
remove
in class AbstractCollectionDecorator<java.util.Map.Entry<K,V>>
public boolean removeAll(java.util.Collection<?> coll)
removeAll
in class AbstractCollectionDecorator<java.util.Map.Entry<K,V>>
public boolean retainAll(java.util.Collection<?> coll)
retainAll
in class AbstractCollectionDecorator<java.util.Map.Entry<K,V>>
public java.util.Iterator<java.util.Map.Entry<K,V>> iterator()
iterator
in class AbstractCollectionDecorator<java.util.Map.Entry<K,V>>
public java.lang.Object[] toArray()
toArray
in class AbstractCollectionDecorator<java.util.Map.Entry<K,V>>
public <T> T[] toArray(T[] array)
toArray
in class AbstractCollectionDecorator<java.util.Map.Entry<K,V>>
Copyright © 2001-2019 - Apache Software Foundation