Package pers.neige.neigeitems.utils
Class ListUtils
-
- All Implemented Interfaces:
public class ListUtils
-
-
Constructor Summary
Constructors Constructor Description ListUtils()
-
Method Summary
Modifier and Type Method Description static <T> T
getOrNull(@NonNull() List<T> list, int index)
static <T> T
getOrDefault(@NonNull() List<T> list, int index, @NonNull() T def)
static <T, V> V
getAndApply(@NonNull() List<T> list, int index, @NonNull() V def, @NonNull() Function<T, V> handler)
static <T> T
getOrNull(Array<T> list, int index)
static <T> T
getOrDefault(Array<T> list, int index, @NonNull() T def)
static <T, V> V
getAndApply(Array<T> list, int index, @NonNull() V def, @NonNull() Function<T, V> handler)
-
-
Method Detail
-
getOrDefault
@NonNull() static <T> T getOrDefault(@NonNull() List<T> list, int index, @NonNull() T def)
-
getAndApply
@NonNull() static <T, V> V getAndApply(@NonNull() List<T> list, int index, @NonNull() V def, @NonNull() Function<T, V> handler)
-
getOrDefault
@NonNull() static <T> T getOrDefault(Array<T> list, int index, @NonNull() T def)
-
-
-
-