- Type Parameters:
T
- the type of the array
@Internal
public sealed interface ObjectArray<T>
Represents an array which will be resized to the highest required index.
-
Method Summary
Modifier and TypeMethodDescription@UnknownNullability T[]
static <T> ObjectArray
<T> static <T> ObjectArray
<T> concurrent
(int initialSize) @UnknownNullability T
get
(int index) default void
remove
(int index) void
static <T> ObjectArray
<T> static <T> ObjectArray
<T> singleThread
(int initialSize) toList()
Copies the array into a list.void
trim()
-
Method Details
-
singleThread
-
singleThread
-
concurrent
-
concurrent
-
get
-
set
-
remove
default void remove(int index) -
trim
void trim() -
arrayCopy
-
toList
Copies the array into a list. Requires all elements to be present and indexed from 0.- Returns:
- List of the array elements
-