public final class ArrayUtils extends Object
Modifier and Type | Method and Description |
---|---|
static <T> T[] |
concat(T[] first,
T[] second)
Combine two arrays.
|
static <T> T[] |
concat(T first,
T[] others)
Create an array starting with first element and followed by others.
|
public static <T> T[] concat(T first, T[] others)
This can be useful when handling vararg parameters and when you want to force to have at least one value.
T
- the type of each element in the arrayfirst
- the first elementothers
- the other elementspublic static <T> T[] concat(T[] first, T[] second)
T
- the type of each element in the arrayfirst
- the first arraysecond
- the second arrayCopyright © 2017. All rights reserved.