Package dev.aherscu.qa.testing.utils
Class ArrayUtilsExtensions
- java.lang.Object
-
- org.apache.commons.lang3.ArrayUtils
-
- dev.aherscu.qa.testing.utils.ArrayUtilsExtensions
-
public final class ArrayUtilsExtensions extends org.apache.commons.lang3.ArrayUtils
Array utilities.- Author:
- aherscu
-
-
Field Summary
-
Fields inherited from class org.apache.commons.lang3.ArrayUtils
EMPTY_BOOLEAN_ARRAY, EMPTY_BOOLEAN_OBJECT_ARRAY, EMPTY_BYTE_ARRAY, EMPTY_BYTE_OBJECT_ARRAY, EMPTY_CHAR_ARRAY, EMPTY_CHARACTER_OBJECT_ARRAY, EMPTY_CLASS_ARRAY, EMPTY_DOUBLE_ARRAY, EMPTY_DOUBLE_OBJECT_ARRAY, EMPTY_FIELD_ARRAY, EMPTY_FLOAT_ARRAY, EMPTY_FLOAT_OBJECT_ARRAY, EMPTY_INT_ARRAY, EMPTY_INTEGER_OBJECT_ARRAY, EMPTY_LONG_ARRAY, EMPTY_LONG_OBJECT_ARRAY, EMPTY_METHOD_ARRAY, EMPTY_OBJECT_ARRAY, EMPTY_SHORT_ARRAY, EMPTY_SHORT_OBJECT_ARRAY, EMPTY_STRING_ARRAY, EMPTY_THROWABLE_ARRAY, EMPTY_TYPE_ARRAY, INDEX_NOT_FOUND
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> T
defaultIfEmpty(T[] array, T defaultValue)
static <T> T
defaultIfEmptyList(List<T> list, T defaultValue)
-
Methods inherited from class org.apache.commons.lang3.ArrayUtils
add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, addAll, addAll, addAll, addAll, addAll, addAll, addAll, addAll, addAll, addFirst, addFirst, addFirst, addFirst, addFirst, addFirst, addFirst, addFirst, addFirst, clone, clone, clone, clone, clone, clone, clone, clone, clone, contains, contains, contains, contains, contains, contains, contains, contains, contains, contains, containsAny, get, get, getComponentType, getLength, hashCode, indexesOf, indexesOf, indexesOf, indexesOf, indexesOf, indexesOf, indexesOf, indexesOf, indexesOf, indexesOf, indexesOf, indexesOf, indexesOf, indexesOf, indexesOf, indexesOf, indexesOf, indexesOf, indexesOf, indexesOf, indexOf, indexOf, indexOf, indexOf, indexOf, indexOf, indexOf, indexOf, indexOf, indexOf, indexOf, indexOf, indexOf, indexOf, indexOf, indexOf, indexOf, indexOf, indexOf, indexOf, insert, insert, insert, insert, insert, insert, insert, insert, insert, isArrayIndexValid, isEmpty, isEmpty, isEmpty, isEmpty, isEmpty, isEmpty, isEmpty, isEmpty, isEmpty, isEquals, isNotEmpty, isNotEmpty, isNotEmpty, isNotEmpty, isNotEmpty, isNotEmpty, isNotEmpty, isNotEmpty, isNotEmpty, isSameLength, isSameLength, isSameLength, isSameLength, isSameLength, isSameLength, isSameLength, isSameLength, isSameLength, isSameLength, isSameType, isSorted, isSorted, isSorted, isSorted, isSorted, isSorted, isSorted, isSorted, isSorted, isSorted, lastIndexOf, lastIndexOf, lastIndexOf, lastIndexOf, lastIndexOf, lastIndexOf, lastIndexOf, lastIndexOf, lastIndexOf, lastIndexOf, lastIndexOf, lastIndexOf, lastIndexOf, lastIndexOf, lastIndexOf, lastIndexOf, lastIndexOf, lastIndexOf, lastIndexOf, lastIndexOf, newInstance, nullToEmpty, nullToEmpty, nullToEmpty, nullToEmpty, nullToEmpty, nullToEmpty, nullToEmpty, nullToEmpty, nullToEmpty, nullToEmpty, nullToEmpty, nullToEmpty, nullToEmpty, nullToEmpty, nullToEmpty, nullToEmpty, nullToEmpty, nullToEmpty, nullToEmpty, nullToEmpty, remove, remove, remove, remove, remove, remove, remove, remove, remove, removeAll, removeAll, removeAll, removeAll, removeAll, removeAll, removeAll, removeAll, removeAll, removeAllOccurences, removeAllOccurences, removeAllOccurences, removeAllOccurences, removeAllOccurences, removeAllOccurences, removeAllOccurences, removeAllOccurences, removeAllOccurences, removeAllOccurrences, removeAllOccurrences, removeAllOccurrences, removeAllOccurrences, removeAllOccurrences, removeAllOccurrences, removeAllOccurrences, removeAllOccurrences, removeAllOccurrences, removeElement, removeElement, removeElement, removeElement, removeElement, removeElement, removeElement, removeElement, removeElement, removeElements, removeElements, removeElements, removeElements, removeElements, removeElements, removeElements, removeElements, removeElements, reverse, reverse, reverse, reverse, reverse, reverse, reverse, reverse, reverse, reverse, reverse, reverse, reverse, reverse, reverse, reverse, reverse, reverse, setAll, setAll, shift, shift, shift, shift, shift, shift, shift, shift, shift, shift, shift, shift, shift, shift, shift, shift, shift, shift, shuffle, shuffle, shuffle, shuffle, shuffle, shuffle, shuffle, shuffle, shuffle, shuffle, shuffle, shuffle, shuffle, shuffle, shuffle, shuffle, shuffle, shuffle, subarray, subarray, subarray, subarray, subarray, subarray, subarray, subarray, subarray, swap, swap, swap, swap, swap, swap, swap, swap, swap, swap, swap, swap, swap, swap, swap, swap, swap, swap, toArray, toMap, toObject, toObject, toObject, toObject, toObject, toObject, toObject, toObject, toPrimitive, toPrimitive, toPrimitive, toPrimitive, toPrimitive, toPrimitive, toPrimitive, toPrimitive, toPrimitive, toPrimitive, toPrimitive, toPrimitive, toPrimitive, toPrimitive, toPrimitive, toPrimitive, toPrimitive, toString, toString, toStringArray, toStringArray
-
-
-
-
Method Detail
-
defaultIfEmpty
public static <T> T defaultIfEmpty(T[] array, T defaultValue)
- Type Parameters:
T
- type of array- Parameters:
array
- an arraydefaultValue
- a default value- Returns:
- the default value if the array is empty or null, otherwise the value at index 0
-
defaultIfEmptyList
public static <T> T defaultIfEmptyList(List<T> list, T defaultValue)
- Type Parameters:
T
- type of array- Parameters:
list
- array listdefaultValue
- a default value- Returns:
- the default value if the list is empty or null, otherwise the value at index 0
-
-