Package com.landawn.abacus.util
Class ImmutableArray<T>
java.lang.Object
com.landawn.abacus.util.ImmutableArray<T>
- All Implemented Interfaces:
Immutable
-
Method Summary
Modifier and TypeMethodDescriptionasList()
boolean
copy
(int fromIndex, int toIndex) static <T> ImmutableArray<T>
copyOf
(T[] elements) boolean
<E extends Exception>
voidforEach
(Throwables.Consumer<T, E> consumer) <E extends Exception>
voidforEachIndexed
(Throwables.IndexedConsumer<T, E> consumer) get
(int index) int
hashCode()
int
boolean
isEmpty()
int
lastIndexOf
(T valueToFind) int
length()
static <T> ImmutableArray<T>
of
(T e1) static <T> ImmutableArray<T>
of
(T e1, T e2) static <T> ImmutableArray<T>
of
(T e1, T e2, T e3) static <T> ImmutableArray<T>
of
(T e1, T e2, T e3, T e4) static <T> ImmutableArray<T>
of
(T e1, T e2, T e3, T e4, T e5) static <T> ImmutableArray<T>
of
(T e1, T e2, T e3, T e4, T e5, T e6) static <T> ImmutableArray<T>
of
(T e1, T e2, T e3, T e4, T e5, T e6, T e7) stream()
toString()
static <T> ImmutableArray<T>
wrap
(T[] elements) Deprecated.
-
Method Details
-
of
-
of
-
of
-
of
-
of
-
of
-
of
-
copyOf
-
wrap
Deprecated.the ImmutableArray may be modified through the specifiedelements
- Type Parameters:
T
-- Parameters:
elements
-- Returns:
- an
ImmutableArray
backed by the specifiedelements
-
length
public int length() -
isEmpty
public boolean isEmpty() -
get
-
indexOf
-
lastIndexOf
-
contains
-
forEach
- Throws:
E extends Exception
-
forEachIndexed
- Throws:
E extends Exception
-
stream
-
copy
-
asList
-
hashCode
public int hashCode() -
equals
-
toString
-
elements