Package com.peterphi.std.util
Class ListUtility
java.lang.Object
com.peterphi.std.util.ListUtility
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> T
Returns 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> T
static <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
-