Class CollectionSet<E>
java.lang.Object
org.graalvm.shadowed.com.ibm.icu.impl.CollectionSet<E>
- All Implemented Interfaces:
Iterable<E>, Collection<E>, Set<E>
A wrapper around java.util.Collection that implements java.util.Set. This class keeps a pointer to the
Collection and does not persist any data on its own.
Useful when you need a Set but creating a HashSet is too expensive.
IMPORTANT: The elements of the Collection *must* be unique! This class does not check.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanaddAll(Collection<? extends E> c) voidclear()booleanbooleancontainsAll(Collection<?> c) booleanisEmpty()iterator()booleanbooleanremoveAll(Collection<?> c) booleanretainAll(Collection<?> c) intsize()Object[]toArray()<T> T[]toArray(T[] a) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface Set
equals, hashCode, spliterator
-
Constructor Details
-
CollectionSet
-
-
Method Details
-
size
-
isEmpty
-
contains
-
iterator
-
toArray
-
toArray
-
add
-
remove
-
containsAll
- Specified by:
containsAllin interfaceCollection<E>- Specified by:
containsAllin interfaceSet<E>
-
addAll
-
retainAll
-
removeAll
-
clear
-