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> TgetOrNull(@NonNull() List<T> list, int index)static <T> TgetOrDefault(@NonNull() List<T> list, int index, @NonNull() T def)static <T, V> VgetAndApply(@NonNull() List<T> list, int index, @NonNull() V def, @NonNull() Function<T, V> handler)static <T> TgetOrNull(Array<T> list, int index)static <T> TgetOrDefault(Array<T> list, int index, @NonNull() T def)static <T, V> VgetAndApply(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)
-
-
-
-