Top Description Methods
org.graalvm.collections

public Interface UnmodifiableEconomicSet<E>

extends Iterable<E>
Known Direct Subinterfaces
org.graalvm.collections.EconomicSet

Unmodifiable memory efficient set data structure.
Since
19.0

Method Summary

Modifier and TypeMethod and Description
public boolean
contains(E element)

Returns true if this set contains a mapping for the element.

public boolean
isEmpty()

Returns true if this set contains no elements.

public int
size()

Returns the number of elements in this set.

public default E[]

Returns:

an array containing all the elements in this set.
toArray
(E[] target)

Stores all of the elements in this set into target.

Inherited from java.lang.Iterable:
forEachiteratorspliterator

Method Detail

containsback to summary
public boolean contains(E element)

Returns true if this set contains a mapping for the element.

Since
19.0
isEmptyback to summary
public boolean isEmpty()

Returns true if this set contains no elements.

Since
19.0
sizeback to summary
public int size()

Returns the number of elements in this set.

Since
19.0
toArrayback to summary
public default E[] toArray(E[] target)

Stores all of the elements in this set into target. An UnsupportedOperationException will be thrown if the length of target does not match the size of this set.

Returns:E[]

an array containing all the elements in this set.

Exceptions
UnsupportedOperationException:
if the length of target does not equal the size of this set.
Since
19.0