java.lang.Object
org.klojang.util.ArrayMethods
Methods for working with arrays.
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> T[]
append
(T[] array, T obj) Appends an element to an array.static <T> T[]
append
(T[] array, T obj0, T obj1, T... moreObjs) Appends multiple elements to an array.asList
(boolean[] values) Converts aboolean
array to aList<Boolean>
.asList
(byte[] values) Converts abyte
array to aList<Byte>
.asList
(char[] values) Converts achar
array to aList<Character>
.asList
(double[] values) Converts adouble
array to aList<Double>
.asList
(float[] values) Converts afloat
array to aList<Float>
.asList
(int[] values) Converts anint
array to aList<Integer>
.asList
(long[] values) Converts along
array to aList<Long>
.asList
(short[] values) Converts ashort
array to aList<Short>
.static Boolean[]
box
(boolean[] values) Converts aboolean
array to aBoolean
array.static Byte[]
box
(byte[] values) Converts abyte
array to aByte
array.static Character[]
box
(char[] values) Converts achar
array to aCharacter
array.static Double[]
box
(double[] values) Converts adouble
array to aDouble
array.static Float[]
box
(float[] values) Converts afloat
array to aFloat
array.static Integer[]
box
(int[] values) Converts anint
array to anInteger
array.static Long[]
box
(long[] values) Converts along
array to aLong
array.static Short[]
box
(short[] values) Converts ashort
array to aShort
array.static char[]
chars
(char... chars) Simply returns the specified array, but allows for leaner code when statically imported.static <T> T[]
concat
(T[] arr0, T[] arr1) Concatenates two arrays.static <T> T[]
concat
(T[] arr0, T[] arr1, T[] arr2, T[]... moreArrays) Concatenates multiple arrays into a single array.static int
deepHashCode
(Object array) Returns the deep hash code of an array.static double[]
doubles
(double... doubles) Simply returns the specified array, but allows for leaner code when statically imported.static OptionalInt
find
(int[] array, IntPredicate test) Returns the first array element that passes the specified test, or an emptyOptionalInt
if no element passed the test.static <T> org.klojang.check.aux.Result
<T> Returns the first array element that passes the specified test, orResult.notAvailable()
if no element passed the test.static <T,
R> org.klojang.check.aux.Result <R> Returns aResult
containing a property of the first array element that passes the specified test, orResult.notAvailable()
if no element passed the test.static float[]
floats
(float... floats) Simply returns the specified array, but allows for leaner code when statically imported.static int
Returns the hash code of an array.static <T> String
implode
(T[] array) PHP-style implode method, concatenating the array elements using ", " (comma+space) as separator.static <T> String
implode
(T[] array, int limit) PHP-style implode method, concatenating at mostlimit
array elements using ", " (comma+space) as separator.static <T> String
PHP-style implode method, concatenating the array elements using the specified separator.static <T> String
PHP-style implode method, concatenating at mostlimit
array elements using the specified separator.static <T> String
PHP-style implode method, concatenating at mostlimit
array elements using ", " (comma+space) as separator.static <T> String
PHP-style implode method, concatenating at mostlimit
array elements using ", " (comma+space) as separator.static <T> String
PHP-style implode method.static String
implodeAny
(Object array) PHP-style implode method, concatenating the array elements using ", " (comma+space) as separator.static String
implodeAny
(Object array, int limit) PHP-style implode method, concatenating at mostlimit
array elements using ", " (comma+space) as separator.static String
implodeAny
(Object array, String separator) PHP-style implode method, concatenating the array elements using the specified separator.static String
implodeAny
(Object array, String separator, int limit) PHP-style implode method, concatenating at mostlimit
array elements using the specified separator.static String
implodeAny
(Object array, Function<Object, String> stringifier) PHP-style implode method, concatenating the array elements using ", " (comma+space) as separator.static String
PHP-style implode method, concatenating the array elements using ", " (comma+space) as separator.static String
PHP-style implode method.static String
implodeInts
(int[] array) PHP-style implode method, concatenating the array elements using ", " (comma+space) as separator.static String
implodeInts
(int[] array, int limit) PHP-style implode method, concatenating at mostlimit
array elements using ", " (comma+space) as separator.static String
implodeInts
(int[] array, String separator) PHP-style implode method, concatenating the array elements using the specified separator.static String
implodeInts
(int[] array, String separator, int limit) PHP-style implode method, concatenating at mostlimit
array elements using the specified separator.static String
implodeInts
(int[] array, IntFunction<String> stringifier) PHP-style implode method, concatenating at mostlimit
array elements using ", " (comma+space) as separator.static String
implodeInts
(int[] array, IntFunction<String> stringifier, String separator, int from, int to) PHP-style implode method, optimized forint[]
arrays.static OptionalInt
indexOf
(int[] array, int value) Returns anOptionalInt
containing the array index of the first occurrence of the specified value within the specified array.static <T> int
indexOf
(T[] array, T value) Returns the array index of the first occurrence of the specified value within the specified array.static int[]
ints
(int... ints) Simply returns the specified array, but allows for leaner code when statically imported.static boolean
isElementOf
(int value, int[] array) Returnstrue
if the specified array contains the specified value.static <T> boolean
isElementOf
(T value, T[] array) Returnstrue
if the specified array contains the specified value.static boolean
Returnstrue
if the specified array contains the specified reference.static OptionalInt
lastIndexOf
(int[] array, int value) Returns anOptionalInt
containing the array index of the last occurrence of the specified value within the specified array.static <T> int
lastIndexOf
(T[] array, T value) Returns the array index of the last occurrence of the specified value within the specified array.static long[]
longs
(long... longs) Simply returns the specified array, but allows for leaner code when statically imported.static <T> T[]
pack
(T... objs) Simply returns the specified array, but allows for leaner code when statically imported.static <T> T[]
prefix
(T[] array, T obj) Prefixes the specified object to the specified array.static <T> T[]
prefix
(T[] array, T obj0, T obj1, T... moreObjs) Prefixes the specified object to the specified array.static int
refIndexOf
(Object[] array, Object reference) Returns the array index of the first occurrence of the specified object, using reference comparisons to identify the object.static int
refLastIndexOf
(Object[] array, Object reference) Returns the array index of the last occurrence of the specified object, using reference comparisons to identify the object.static int[]
reverse
(int[] array) Reverses the order of the elements in the specified array.static int[]
reverse
(int[] array, int from, int to) Reverses the order of the elements in the specified array segmentstatic <T> T[]
reverse
(T[] array) Reverses the order of the elements in the specified array.static <T> T[]
reverse
(T[] array, int from, int to) Reverses the order of the elements in the specified array segment.static int[]
Converts anInteger
array to anint
array.static int[]
Converts anInteger
array to anint
array.
-
Field Details
-
EMPTY_OBJECT_ARRAY
A zero-length Object array. -
EMPTY_STRING_ARRAY
A zero-length String array. -
EMPTY_INT_ARRAY
public static final int[] EMPTY_INT_ARRAYA zero-lengthint
array. -
EMPTY_LONG_ARRAY
public static final long[] EMPTY_LONG_ARRAYA zero-lengthlong
array.
-
-
Method Details
-
append
public static <T> T[] append(T[] array, T obj) Appends an element to an array.- Type Parameters:
T
- the type of the array elements- Parameters:
array
- the array to append the object toobj
- the object to append- Returns:
- a new array containing the original array plus the extra element
-
append
Appends multiple elements to an array.- Type Parameters:
T
- the type of the array elements- Parameters:
array
- the array to append the objects toobj0
- the 1st object to appendobj1
- the 2nd object to appendmoreObjs
- more objects to append- Returns:
- a new array containing the original array plus the extra elements
-
concat
public static <T> T[] concat(T[] arr0, T[] arr1) Concatenates two arrays.- Type Parameters:
T
- the type of the array elements- Parameters:
arr0
- The 1st array to go into the new arrayarr1
- The 2nd array to go into the new array- Returns:
- a new array containing all elements of the specified arrays
-
concat
Concatenates multiple arrays into a single array.- Type Parameters:
T
- the type of the array elements- Parameters:
arr0
- The 1st array to go into the new arrayarr1
- The 2nd array to go into the new arrayarr2
- The 3rd array to go into the new arraymoreArrays
- More arrays to concatenate- Returns:
- a new array containing all elements of the specified arrays
-
isElementOf
public static boolean isElementOf(int value, int[] array) Returnstrue
if the specified array contains the specified value.- Parameters:
value
- the value to search forarray
- the array to search- Returns:
- whether the array contains the value
- See Also:
-
isElementOf
public static <T> boolean isElementOf(T value, T[] array) Returnstrue
if the specified array contains the specified value.- Type Parameters:
T
- the type of the array elements- Parameters:
value
- the value to search forarray
- the array to search- Returns:
- whether the array contains the value
- See Also:
-
isOneOf
Returnstrue
if the specified array contains the specified reference.- Parameters:
reference
- the reference to search forreferences
- the array to search- Returns:
- whether the array contains the reference
- See Also:
-
indexOf
Returns anOptionalInt
containing the array index of the first occurrence of the specified value within the specified array. Returns an emptyOptionalInt
if the array does not contain the value.- Parameters:
array
- the array to searchvalue
- the value to search for- Returns:
- an
OptionalInt
containing the array index of the value
-
lastIndexOf
Returns anOptionalInt
containing the array index of the last occurrence of the specified value within the specified array. Returns an emptyOptionalInt
if the array does not contain the value.- Parameters:
array
- the array to searchvalue
- the value to search for- Returns:
- an
OptionalInt
containing the array index of the value
-
indexOf
public static <T> int indexOf(T[] array, T value) Returns the array index of the first occurrence of the specified value within the specified array. Returns -1 if the array does not contain the value. Searching for null is allowed.- Type Parameters:
T
- the type of the elements within the array- Parameters:
array
- the array to searchvalue
- the value to search for (may be null)- Returns:
- the array index of the value
-
lastIndexOf
public static <T> int lastIndexOf(T[] array, T value) Returns the array index of the last occurrence of the specified value within the specified array. Returns -1 if the array does not contain the value. Searching for null is allowed.- Type Parameters:
T
- the type of the elements within the array- Parameters:
array
- the array to searchvalue
- the value to search for (may be null)- Returns:
- the array index of the value
-
refIndexOf
Returns the array index of the first occurrence of the specified object, using reference comparisons to identify the object. Returns -1 if the array does not contain the specified reference. Searching for null is not allowed.- Parameters:
array
- the array to searchreference
- The reference to search for (must not be null)- Returns:
- the array index of the reference
-
refLastIndexOf
Returns the array index of the last occurrence of the specified object, using reference comparisons to identify the object. Returns -1 if the array does not contain the specified reference. Searching for null is not allowed.- Parameters:
array
- the array to searchreference
- The reference to search for (must not be null)- Returns:
- the array index of the reference
-
find
Returns the first array element that passes the specified test, orResult.notAvailable()
if no element passed the test.- Type Parameters:
T
- the type of the array elements- Parameters:
array
- the arraytest
- the test- Returns:
- the first array element that passes the specified test, or
Result.notAvailable()
if no element passed the test.
-
find
public static <T,R> org.klojang.check.aux.Result<R> find(T[] array, Predicate<T> test, Function<T, R> property) Returns aResult
containing a property of the first array element that passes the specified test, orResult.notAvailable()
if no element passed the test.Person[] persons = getPersons(); find(persons, p -> p.age() < 15, Person::firstName).ifAvailable( name -> System.out.printf("And the winner is ..... %s!!!%n, name); );
- Type Parameters:
T
- the type of the array elementsR
- the type of the value extracted from the array element- Parameters:
array
- the arraytest
- the testproperty
- a function that extracts some value from thr array element- Returns:
- the
Result
containing the value extracted from the first array element that passed the specified test, ornull
if no element passed the test
-
find
Returns the first array element that passes the specified test, or an emptyOptionalInt
if no element passed the test.- Parameters:
array
- the arraytest
- the test- Returns:
- the first array element that passes the specified test, or an empty
OptionalInt
if no element passed the test
-
reverse
public static <T> T[] reverse(T[] array) Reverses the order of the elements in the specified array.- Type Parameters:
T
- the type of the array elements- Parameters:
array
- the array- Returns:
- the input array
-
reverse
public static <T> T[] reverse(T[] array, int from, int to) Reverses the order of the elements in the specified array segment.- Type Parameters:
T
- the type of the array elements- Parameters:
array
- the arrayfrom
- the start index (inclusive) of the array segmentto
- the end index (exclusive) of the array segment- Returns:
- the input array
-
reverse
public static int[] reverse(int[] array) Reverses the order of the elements in the specified array.- Parameters:
array
- the array- Returns:
- the input array
-
reverse
public static int[] reverse(int[] array, int from, int to) Reverses the order of the elements in the specified array segment- Parameters:
array
- the arrayfrom
- the start index (inclusive) of the array segmentto
- the end index (exclusive) of the array segment- Returns:
- the input array
-
hashCode
Returns the hash code of an array. Allows you to retrieve the hash code of an array object even if you don't know its exact type. AnIllegalArgumentException
is thrown if the argument is not an array.- Parameters:
array
- the array- Returns:
- Its hash code
-
deepHashCode
Returns the deep hash code of an array. Allow you to retrieve the deep hash code of an array object even if you don't know its exact type. AnIllegalArgumentException
is thrown if the argument is not an array.- Parameters:
array
- the array- Returns:
- Its deep hash code
-
implodeInts
PHP-style implode method, concatenating the array elements using ", " (comma+space) as separator. Optimized forint[]
arrays.- Parameters:
array
- the array to implode- Returns:
- a concatenation of the elements in the array.
-
implodeInts
PHP-style implode method, concatenating the array elements using the specified separator. Optimized forint[]
arrays.- Parameters:
array
- the array to implodeseparator
- the string used to separate the elements- Returns:
- a concatenation of the elements in the array.
-
implodeInts
PHP-style implode method, concatenating at mostlimit
array elements using ", " (comma+space) as separator.- Parameters:
array
- the array to implodelimit
- The maximum number of elements to collect. The specified number will be clamped toarray.length
(i.e. it's OK to specify a number greater thanarray.length
). You can specify -1 as a shorthand forarray.length
.- Returns:
- a concatenation of the elements in the array.
-
implodeInts
PHP-style implode method, concatenating at mostlimit
array elements using ", " (comma+space) as separator.- Parameters:
array
- the array to implodestringifier
- AFunction
that converts the array elements to strings- Returns:
- a concatenation of the elements in the array.
-
implodeInts
PHP-style implode method, concatenating at mostlimit
array elements using the specified separator.- Parameters:
array
- the array to implodeseparator
- the string used to separate the elementslimit
- The maximum number of elements to collect. The specified number will be clamped toarray.length
(i.e. it's OK to specify a number greater thanarray.length
). You can specify -1 as a shorthand forarray.length
.- Returns:
- a concatenation of the elements in the array.
-
implodeInts
public static String implodeInts(int[] array, IntFunction<String> stringifier, String separator, int from, int to) PHP-style implode method, optimized forint[]
arrays.- Parameters:
array
- the array to implodestringifier
- AFunction
that converts the array elements to stringsseparator
- the string used to separate the elementsfrom
- The index of the element to begin the concatenation with (inclusive)to
- The index of the element to end the concatenation with (exclusive). The specified number will be clamped toarray.length
(i.e. it's OK to specify a number greater thanarray.length
). You can specify -1 as a shorthand forarray.length
.- Returns:
- a concatenation of the elements in the array.
- See Also:
-
implodeAny
PHP-style implode method, concatenating the array elements using ", " (comma+space) as separator. This method is primarily meant to implode primitive arrays, but you can use it to implode any type of array. AnIllegalArgumentException
is thrown ifarray
is not an array.- Parameters:
array
- the array to implode- Returns:
- a concatenation of the elements in the array.
- See Also:
-
implodeAny
PHP-style implode method, concatenating the array elements using the specified separator. This method is primarily meant to implode primitive arrays, but you can use it to implode any type of array. AnIllegalArgumentException
is thrown ifarray
is not an array.- Parameters:
array
- the array to implodeseparator
- the string used to separate the elements- Returns:
- a concatenation of the elements in the array.
- See Also:
-
implodeAny
PHP-style implode method, concatenating the array elements using ", " (comma+space) as separator. This method is primarily meant to implode primitive arrays, but you can use it to implode any type of array. AnIllegalArgumentException
is thrown ifarray
is not an array.- Parameters:
array
- the array to implodestringifier
- AFunction
that converts the array elements to strings- Returns:
- a concatenation of the elements in the array.
- See Also:
-
implodeAny
public static String implodeAny(Object array, Function<Object, String> stringifier, String separator) PHP-style implode method, concatenating the array elements using ", " (comma+space) as separator. This method is primarily meant to implode primitive arrays, but you can use it to implode any type of array. AnIllegalArgumentException
is thrown ifarray
is not an array.- Parameters:
array
- the array to implodestringifier
- AFunction
that converts the array elements to stringsseparator
- the string used to separate the elements- Returns:
- a concatenation of the elements in the array.
- See Also:
-
implodeAny
PHP-style implode method, concatenating at mostlimit
array elements using ", " (comma+space) as separator. This method is primarily meant to implode primitive arrays, but you can use it to implode any type of array. AnIllegalArgumentException
is thrown ifarray
is not an array.- Parameters:
array
- the array to implodelimit
- The maximum number of elements to collect. The specified number will be clamped toarray.length
(i.e. it's OK to specify a number greater thanarray.length
). You can specify -1 as a shorthand forarray.length
.- Returns:
- a concatenation of the elements in the array.
-
implodeAny
PHP-style implode method, concatenating at mostlimit
array elements using the specified separator. This method is primarily meant to implode primitive arrays, but you can use it to implode any type of array. AnIllegalArgumentException
is thrown ifarray
is not an array.- Parameters:
array
- the array to implodeseparator
- the string used to separate the elementslimit
- The maximum number of elements to collect. The specified number will be clamped toarray.length
(i.e. it's OK to specify a number greater thanarray.length
). You can specify -1 as a shorthand forarray.length
.- Returns:
- a concatenation of the elements in the array.
-
implodeAny
public static String implodeAny(Object array, Function<Object, String> stringifier, String separator, int from, int to) PHP-style implode method. This method is primarily meant to implode primitive arrays, but you can use it to implode any type of array. AnIllegalArgumentException
is thrown ifarray
is not an array.- Parameters:
array
- the array to implodestringifier
- AFunction
that converts the array elements to stringsseparator
- the string used to separate the elementsfrom
- The index of the element to begin the concatenation with (inclusive)to
- The index of the element to end the concatenation with (exclusive). The specified number will be clamped toarray.length
(i.e. it's OK to specify a number greater thanarray.length
). You can specify -1 as a shorthand forarray.length
.- Returns:
- a concatenation of the elements in the array.
- See Also:
-
implode
PHP-style implode method, concatenating the array elements using ", " (comma+space) as separator.- Type Parameters:
T
- the type of the array elements- Parameters:
array
- the collection to implode- Returns:
- a concatenation of the elements in the collection.
- See Also:
-
implode
PHP-style implode method, concatenating the array elements using the specified separator.- Type Parameters:
T
- the type of the array elements- Parameters:
array
- the array to implodeseparator
- the string used to separate the elements- Returns:
- a concatenation of the elements in the array.
- See Also:
-
implode
PHP-style implode method, concatenating at mostlimit
array elements using ", " (comma+space) as separator.- Type Parameters:
T
- the type of the array elements- Parameters:
array
- the array to implodelimit
- The maximum number of elements to collect. The specified number will be clamped toarray.length
(i.e. it's OK to specify a number greater thanarray.length
). You can specify -1 as a shorthand forarray.length
.- Returns:
- a concatenation of the elements in the array.
- See Also:
-
implode
PHP-style implode method, concatenating at mostlimit
array elements using ", " (comma+space) as separator.- Type Parameters:
T
- the type of the array elements- Parameters:
array
- the array to implodestringifier
- AFunction
that converts the array elements to strings- Returns:
- a concatenation of the elements in the array.
- See Also:
-
implode
PHP-style implode method, concatenating at mostlimit
array elements using ", " (comma+space) as separator.- Type Parameters:
T
- the type of the array elements- Parameters:
array
- the array to implodestringifier
- AFunction
that converts the array elements to stringsseparator
- the string used to separate the elements- Returns:
- a concatenation of the elements in the array.
- See Also:
-
implode
PHP-style implode method, concatenating at mostlimit
array elements using the specified separator.- Type Parameters:
T
- the type of the array elements- Parameters:
array
- the array to implodeseparator
- the string used to separate the elementslimit
- The maximum number of elements to collect. The specified number will be clamped toarray.length
(i.e. it's OK to specify a number greater thanarray.length
). You can specify -1 as a shorthand forarray.length
.- Returns:
- a concatenation of the elements in the array.
- See Also:
-
implode
public static <T> String implode(T[] array, Function<T, String> stringifier, String separator, int from, int to) PHP-style implode method.- Type Parameters:
T
- the type of the array elements- Parameters:
array
- the array to implodestringifier
- AFunction
that converts the array elements to stringsseparator
- the string used to separate the elementsfrom
- The index of the element to begin the concatenation with (inclusive)to
- The index of the element to end the concatenation with (exclusive). The specified number will be clamped toarray.length
(i.e. it's OK to specify a number greater thanarray.length
). You can specify -1 as a shorthand forarray.length
.- Returns:
- a concatenation of the elements in the array.
- See Also:
-
pack
Simply returns the specified array, but allows for leaner code when statically imported.- Type Parameters:
T
- the type of the objects to pack- Parameters:
objs
- the array- Returns:
- the same array
-
ints
public static int[] ints(int... ints) Simply returns the specified array, but allows for leaner code when statically imported.- Parameters:
ints
- the array- Returns:
- the same array
-
chars
public static char[] chars(char... chars) Simply returns the specified array, but allows for leaner code when statically imported.- Parameters:
chars
- the array- Returns:
- the same array
-
doubles
public static double[] doubles(double... doubles) Simply returns the specified array, but allows for leaner code when statically imported.- Parameters:
doubles
- the array- Returns:
- the same array
-
longs
public static long[] longs(long... longs) Simply returns the specified array, but allows for leaner code when statically imported.- Parameters:
longs
- the array- Returns:
- the same array
-
floats
public static float[] floats(float... floats) Simply returns the specified array, but allows for leaner code when statically imported.- Parameters:
floats
- The array- Returns:
- the same array
-
prefix
public static <T> T[] prefix(T[] array, T obj) Prefixes the specified object to the specified array.- Type Parameters:
T
- the type of the array elements and the object to be prefixed- Parameters:
array
- the array to be prefixedobj
- the object to prefix- Returns:
- a new array containing the specified object and the elements of the specified array
-
prefix
Prefixes the specified object to the specified array.- Type Parameters:
T
- the type of the array elements and the object to be prefixed- Parameters:
array
- the array to be prefixedobj0
- the 1st object to prefixobj1
- the 2nd object to prefixmoreObjs
- more objects to prefix- Returns:
- a new array containing the specified objects and the elements of the specified array
-
asList
Converts anint
array to aList<Integer>
.- Parameters:
values
- the array elements.- Returns:
- a
List
containing the same elements in the same order
-
asList
Converts afloat
array to aList<Float>
.- Parameters:
values
- the array elements.- Returns:
- a
List
containing the same elements in the same order
-
asList
Converts adouble
array to aList<Double>
.- Parameters:
values
- the array elements.- Returns:
- a
List
containing the same elements in the same order
-
asList
Converts along
array to aList<Long>
.- Parameters:
values
- the array elements.- Returns:
- a
List
containing the same elements in the same order
-
asList
Converts ashort
array to aList<Short>
.- Parameters:
values
- the array elements.- Returns:
- a
List
containing the same elements in the same order
-
asList
Converts abyte
array to aList<Byte>
.- Parameters:
values
- the array elements.- Returns:
- a
List
containing the same elements in the same order
-
asList
Converts achar
array to aList<Character>
.- Parameters:
values
- the array elements.- Returns:
- a
List
containing the same elements in the same order
-
asList
Converts aboolean
array to aList<Boolean>
.- Parameters:
values
- the array elements.- Returns:
- a
List
containing the same elements in the same order
-
unbox
Converts anInteger
array to anint
array.- Parameters:
values
- theInteger
arraydfault
- Theint
value to convertnull
elements in the source array to- Returns:
- the
int
array
-
unbox
Converts anInteger
array to anint
array.null
elements in the source array are converted to 0 (zero).- Parameters:
values
- theInteger
array- Returns:
- the
int
array
-
box
Converts anint
array to anInteger
array.- Parameters:
values
- theint
array- Returns:
- the
Integer
array
-
box
Converts adouble
array to aDouble
array.- Parameters:
values
- thedouble
array- Returns:
- the
Double
array
-
box
Converts along
array to aLong
array.- Parameters:
values
- thelong
array- Returns:
- the
Long
array
-
box
Converts afloat
array to aFloat
array.- Parameters:
values
- thefloat
array- Returns:
- the
Float
array
-
box
Converts ashort
array to aShort
array.- Parameters:
values
- theshort
array- Returns:
- the
Short
array
-
box
Converts abyte
array to aByte
array.- Parameters:
values
- thebyte
array- Returns:
- the
Byte
array
-
box
Converts achar
array to aCharacter
array.- Parameters:
values
- thechar
array- Returns:
- the
Character
array
-
box
Converts aboolean
array to aBoolean
array.- Parameters:
values
- theboolean
array- Returns:
- the
Boolean
array
-