Package org.graalvm.collections
Interface UnmodifiableEconomicSet<E>
- All Superinterfaces:
Iterable<E>
- All Known Subinterfaces:
EconomicSet<E>
Unmodifiable memory efficient set data structure.
- Since:
- 19.0
-
Method Summary
Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Method Details
-
contains
Returnstrue
if this set contains a mapping for theelement
.- Since:
- 19.0
-
size
int size()Returns the number of elements in this set.- Since:
- 19.0
-
isEmpty
boolean isEmpty()Returnstrue
if this set contains no elements.- Since:
- 19.0
-
toArray
Stores all of the elements in this set intotarget
. AnUnsupportedOperationException
will be thrown if the length oftarget
does not match the size of this set.- Returns:
- an array containing all the elements in this set.
- Throws:
UnsupportedOperationException
- if the length oftarget
does not equal the size of this set.- Since:
- 19.0
-