Class ArrayUtils
java.lang.Object
org.yaml.snakeyaml.util.ArrayUtils
Array manipulation
-
Method Summary
Modifier and TypeMethodDescriptionstatic <E> List<E> toUnmodifiableCompositeList(E[] array1, E[] array2) Returns an unmodifiableListcontaining the second array appended to the first one.static <E> List<E> toUnmodifiableList(E[] elements) Returns an unmodifiableListbacked by the given array.
-
Method Details
-
toUnmodifiableList
Returns an unmodifiableListbacked by the given array. The method doesn't copy the array, so the changes to the array will affect theListas well.- Type Parameters:
E- class of the elements in the array- Parameters:
elements- - array to convert- Returns:
Listbacked by the given array
-
toUnmodifiableCompositeList
Returns an unmodifiableListcontaining the second array appended to the first one. The method doesn't copy the arrays, so the changes to the arrays will affect theListas well.- Type Parameters:
E- class of the elements in the array- Parameters:
array1- - the array to extendarray2- - the array to add to the first- Returns:
Listbacked by the given arrays
-