public class ArrayUtils
extends java.lang.Object
| Constructor and Description |
|---|
ArrayUtils() |
| Modifier and Type | Method and Description |
|---|---|
static <I,O> O[] |
map(I[] input,
java.util.function.Function<I,O> mapper,
java.util.function.IntFunction<O[]> arrayCreator)
Map an array from one type to another.
|
static <T> void |
reverse(T[] array)
Reverse an array in place.
|
public static <I,O> O[] map(I[] input,
java.util.function.Function<I,O> mapper,
java.util.function.IntFunction<O[]> arrayCreator)
I - The input typeO - The output typeinput - The input arraymapper - The function to map the input to the outputarrayCreator - The function to create a new array with the length of the input arraypublic static <T> void reverse(T[] array)
T - The type of the arrayarray - The array to reverse