Package com.peterphi.std.util
Class ListUtility
java.lang.Object
com.peterphi.std.util.ListUtility
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> TReturns the first element of an Iterable (or null if the list is empty)static <T> HybridIterator<T>iterate(Enumeration<T> items) static <T> HybridIterator<T>static <T> Tstatic <T> List<T>Converts an Iterable into a Liststatic <T> List<T>static <T> List<T>list(T[] items) static <T> List<T>Returns a sublist containing all the items in the list after the first
-
Constructor Details
-
ListUtility
public ListUtility()
-
-
Method Details
-
list
-
list
-
list
Converts an Iterable into a List- Parameters:
iterable-- Returns:
-
last
-
head
Returns the first element of an Iterable (or null if the list is empty)- Parameters:
list-- Returns:
-
tail
Returns a sublist containing all the items in the list after the first- Parameters:
list-- Returns:
-
iterate
-
iterate
-