Package org.cloudburstmc.nbt.util
Class UnmodifiableEntrySet<K,V>
java.lang.Object
org.cloudburstmc.nbt.util.UnmodifiableEntrySet<K,V>
- All Implemented Interfaces:
Iterable<Map.Entry<K,,V>> Collection<Map.Entry<K,,V>> Set<Map.Entry<K,V>>
public class UnmodifiableEntrySet<K,V>
extends Object
implements Set<Map.Entry<K,V>>, Collection<Map.Entry<K,V>>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanaddAll(Collection<? extends Map.Entry<K, V>> c) voidclear()booleanThis method is overridden to protect the backing set against an object with a nefarious equals function that senses that the equality-candidate is Map.Entry and calls its setValue method.booleancontainsAll(Collection<?> coll) The next two methods are overridden to protect against an unscrupulous List whose contains(Object o) method senses when o is a Map.Entry, and calls o.setValue.booleanvoidinthashCode()booleanisEmpty()iterator()booleanbooleanremoveAll(Collection<?> coll) booleanretainAll(Collection<?> coll) intsize()stream()Object[]toArray()<T> T[]toArray(T[] a) toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
removeIf, toArray
-
Constructor Details
-
UnmodifiableEntrySet
-
-
Method Details
-
forEach
-
hashCode
public int hashCode() -
size
public int size() -
isEmpty
public boolean isEmpty() -
toString
-
add
-
addAll
-
remove
-
removeAll
-
retainAll
-
clear
public void clear() -
spliterator
- Specified by:
spliteratorin interfaceCollection<K>- Specified by:
spliteratorin interfaceIterable<K>- Specified by:
spliteratorin interfaceSet<K>
-
stream
- Specified by:
streamin interfaceCollection<K>
-
parallelStream
- Specified by:
parallelStreamin interfaceCollection<K>
-
iterator
-
toArray
-
toArray
public <T> T[] toArray(T[] a) -
contains
This method is overridden to protect the backing set against an object with a nefarious equals function that senses that the equality-candidate is Map.Entry and calls its setValue method. -
containsAll
The next two methods are overridden to protect against an unscrupulous List whose contains(Object o) method senses when o is a Map.Entry, and calls o.setValue.- Specified by:
containsAllin interfaceCollection<K>- Specified by:
containsAllin interfaceSet<K>
-
equals
-