Package com.github.tadukoo.util
Class ListUtil
java.lang.Object
com.github.tadukoo.util.ListUtil
Util functions for dealing with
List
s.- Since:
- Alpha v.0.1
- Version:
- Alpha v.0.2
- Author:
- Logan Ferree (Tadukoo)
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> List<T>
createList
(T... t) Creates aList
using the given array of arguments.static boolean
Checks if the given List is blank (either null or an empty list).static boolean
isNotBlank
(List<?> list) Checks if the given List is NOT blank (blank = either null or an empty List).
-
Constructor Details
-
ListUtil
private ListUtil()Not allowed to create a ListUtil
-
-
Method Details
-
isBlank
Checks if the given List is blank (either null or an empty list).- Parameters:
list
- The List to check- Returns:
- true if the List is null or empty
-
isNotBlank
Checks if the given List is NOT blank (blank = either null or an empty List).- Parameters:
list
- The List to check- Returns:
- true if the List is not null and not empty
-
createList
Creates aList
using the given array of arguments. This is an improvement overArrays.asList(T...)
as it actually allows you to manipulate thisList
instead of having an immutable List.- Type Parameters:
T
- The List's type argument and type of variables passed in- Parameters:
t
- The array of variables passed in- Returns:
- A List containing the given variables
-