| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static <T> List | Returns: List containing the given itemThe item to add to the new list item)Creates a new List with the given item as the first entry. |
| public static <T> List | Returns: The input list when it is not null, a new list otherwiseThe list to process, can be null list)Returns the list when it is not null. |
| public static <T> List | Returns: null when the list is empty or null, the given list otherwiseThe list to process list)Returns null, when the given list is empty or null |
| public static <T> T | Returns: The first entry of the list when it is not null or empty, null otherwiseThe list to extract the first entry from, can be null list)Extracts the first entry of the list when it is not null and contains values. |
| public static boolean | |
| public static boolean | Returns: true when the list is not null and not emptyThe list to check list)Checks whether the list is not null and not empty. |
| public static boolean |
| Lists | back to summary |
|---|---|
| private Lists() | |
| create | back to summary |
|---|---|
| public static <T> List Creates a new List with the given item as the first entry.
| |
| createWhenNull | back to summary |
|---|---|
| public static <T> List Returns the list when it is not null. Returns a new list otherwise. | |
| emptyToNull | back to summary |
|---|---|
| public static <T> List Returns null, when the given list is empty or null | |
| firstEntry | back to summary |
|---|---|
| public static <T> T firstEntry(final List<T> list) Extracts the first entry of the list when it is not null and contains values.
| |
| isEmpty | back to summary |
|---|---|
| public static boolean isEmpty(final List<?> list) Checks whether the list is null or empty.
| |
| isNotEmpty | back to summary |
|---|---|
| public static boolean isNotEmpty(final List<?> list) Checks whether the list is not null and not empty.
| |
| sizeIs | back to summary |
|---|---|
| public static boolean sizeIs(final List<?> list, final int size) Checks whether the list has the given size. A null list is treated like a list without entries.
| |