Package net.anawesomguy.wsmlmb.util
Class ListArrayUtil
java.lang.Object
net.anawesomguy.wsmlmb.util.ListArrayUtil
Very simple class containing utilities for working with
Lists and Arrays.-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> T[]static <T> Tstatic <T> Tlast(T[] array) static <T> TlastOrThrow(List<T> list) static <T> TlastOrThrow(T[] array) static <T> ArrayList<T>list(T... elements) static <T> T[]removeFirst(T[] array) static <T> TremoveLast(List<T> list) static <T> T[]removeLast(T[] array) static <T> T[]toArray(Collection<T> coll)
-
Field Details
-
EMPTY_ARRAY
-
-
Method Details
-
last
public static <T> T last(T[] array) -
lastOrThrow
public static <T> T lastOrThrow(T[] array) -
last
-
lastOrThrow
-
removeLast
public static <T> T[] removeLast(T[] array) -
removeLast
-
removeFirst
public static <T> T[] removeFirst(T[] array) -
emptyArray
public static <T> T[] emptyArray() -
toArray
-
list
-