class IndexableHelper
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
(package private) static BooleanIndexable.Base |
frozenFromArray(boolean[] array)
Get a boolean indexable view of an array which is frozen.
|
(package private) static BooleanIndexable.Base |
frozenFromArray(boolean[] array,
int start,
int length)
Get a boolean indexable view of a part of an array which is frozen.
|
(package private) static ByteIndexable.Base |
frozenFromArray(byte[] array)
Get a byte indexable view of an array which is frozen.
|
(package private) static ByteIndexable.Base |
frozenFromArray(byte[] array,
int start,
int length)
Get a byte indexable view of a part of an array which is frozen.
|
(package private) static CharIndexable.Base |
frozenFromArray(char[] array)
Get a char indexable view of an array which is frozen.
|
(package private) static CharIndexable.Base |
frozenFromArray(char[] array,
int start,
int length)
Get a char indexable view of a part of an array which is frozen.
|
(package private) static DoubleIndexable.Base |
frozenFromArray(double[] array)
Get a double indexable view of an array which is frozen.
|
(package private) static DoubleIndexable.Base |
frozenFromArray(double[] array,
int start,
int length)
Get a double indexable view of a part of an array which is frozen.
|
(package private) static FloatIndexable.Base |
frozenFromArray(float[] array)
Get a float indexable view of an array which is frozen.
|
(package private) static FloatIndexable.Base |
frozenFromArray(float[] array,
int start,
int length)
Get a float indexable view of a part of an array which is frozen.
|
(package private) static IntIndexable.Base |
frozenFromArray(int[] array)
Get an int indexable view of an array which is frozen.
|
(package private) static IntIndexable.Base |
frozenFromArray(int[] array,
int start,
int length)
Get an int indexable view of a part of an array which is frozen.
|
(package private) static LongIndexable.Base |
frozenFromArray(long[] array)
Get a long indexable view of an array which is frozen.
|
(package private) static LongIndexable.Base |
frozenFromArray(long[] array,
int start,
int length)
Get a long indexable view of a part of an array which is frozen.
|
(package private) static ShortIndexable.Base |
frozenFromArray(short[] array)
Get a short indexable view of an array which is frozen.
|
(package private) static ShortIndexable.Base |
frozenFromArray(short[] array,
int start,
int length)
Get a short indexable view of a part of an array which is frozen.
|
(package private) static <T> Indexable.Base<T> |
frozenFromArray(T[] array) |
(package private) static <T> Indexable.Base<T> |
frozenFromList(java.util.List<T> list)
Create a frozen indexable from a list.
|
(package private) static <T> Indexable.Base<T> |
frozenFromList(java.util.List<T> list,
java.util.function.Function<? super T,? extends T> elementCloner)
Create a frozen indexable from a list while keeping possibly mutable elements safe.
|
@NotNull static <T> Indexable.Base<T> frozenFromList(@NotNull java.util.List<T> list)
T
- element type of indexable/listlist
- list to be wrapped by an indexable@NotNull static <T> Indexable.Base<T> frozenFromList(@NotNull java.util.List<T> list, @NotNull java.util.function.Function<? super T,? extends T> elementCloner)
T
- element type of indexable/listlist
- list to be wrapped by an indexableelementCloner
- function called for each requested element which returns a copy it@NotNull static <T> Indexable.Base<T> frozenFromArray(@NotNull T[] array)
@NotNull static DoubleIndexable.Base frozenFromArray(@NotNull double[] array)
array
- array not expected to be changedarray
@NotNull static DoubleIndexable.Base frozenFromArray(@NotNull double[] array, int start, int length)
array
- array not expected to be changedstart
- start index into arraylength
- number of values to be used from arrayarray
@NotNull static FloatIndexable.Base frozenFromArray(@NotNull float[] array)
array
- array not expected to be changedarray
@NotNull static FloatIndexable.Base frozenFromArray(@NotNull float[] array, int start, int length)
array
- array not expected to be changedstart
- start index into arraylength
- number of values to be used from arrayarray
@NotNull static LongIndexable.Base frozenFromArray(@NotNull long[] array)
array
- array not expected to be changedarray
@NotNull static LongIndexable.Base frozenFromArray(@NotNull long[] array, int start, int length)
array
- array not expected to be changedstart
- start index into arraylength
- number of values to be used from arrayarray
@NotNull static IntIndexable.Base frozenFromArray(@NotNull int[] array)
array
- array not expected to be changedarray
@NotNull static IntIndexable.Base frozenFromArray(@NotNull int[] array, int start, int length)
array
- array not expected to be changedstart
- start index into arraylength
- number of values to be used from arrayarray
@NotNull static ShortIndexable.Base frozenFromArray(@NotNull short[] array)
array
- array not expected to be changedarray
@NotNull static ShortIndexable.Base frozenFromArray(@NotNull short[] array, int start, int length)
array
- array not expected to be changedstart
- start index into arraylength
- number of values to be used from arrayarray
@NotNull static ByteIndexable.Base frozenFromArray(@NotNull byte[] array)
array
- array not expected to be changedarray
@NotNull static ByteIndexable.Base frozenFromArray(@NotNull byte[] array, int start, int length)
array
- array not expected to be changedstart
- start index into arraylength
- number of values to be used from arrayarray
@NotNull static CharIndexable.Base frozenFromArray(@NotNull char[] array)
array
- array not expected to be changedarray
@NotNull static CharIndexable.Base frozenFromArray(@NotNull char[] array, int start, int length)
array
- array not expected to be changedstart
- start index into arraylength
- number of values to be used from arrayarray
@NotNull static BooleanIndexable.Base frozenFromArray(@NotNull boolean[] array)
array
- array not expected to be changedarray
@NotNull static BooleanIndexable.Base frozenFromArray(@NotNull boolean[] array, int start, int length)
array
- array not expected to be changedstart
- start index into arraylength
- number of values to be used from arrayarray