public final class ArrayFactory extends Object
ArrayFactory provides factory methods for create new Array
objects| Constructor and Description |
|---|
ArrayFactory() |
| Modifier and Type | Method and Description |
|---|---|
static <T> T[] |
newArray(T... elements)
Factory method for create new array from the given optional elements.
|
static boolean[] |
newBooleanArray(boolean... elements)
Factory method for create new array of primitive boolean values from the given optional
elements.
|
static byte[] |
newByteArray(byte... elements)
Factory method for create new array of primitive byte values from the given optional
elements.
|
static char[] |
newCharArray(char... elements)
Factory method for create new array of primitive character values from the given optional
elements.
|
static double[] |
newDoubleArray(double... elements)
Factory method for create new array of primitive double values from the given optional
elements.
|
static float[] |
newFloatArray(float... elements)
Factory method for create new array of primitive float values from the given optional
elements.
|
static int[] |
newIntArray(int... elements)
Factory method for create new array of primitive integer values from the given optional
elements.
|
static long[] |
newLongArray(long... elements)
Factory method for create new array of primitive long values from the given optional
elements.
|
static Integer[] |
newRangeArray(int start,
int end)
Creates a new
Integer array with the given range that is defined through start and
end. |
static short[] |
newShortArray(short... elements)
Factory method for create new array of primitive short values from the given optional
elements.
|
@SafeVarargs public static <T> T[] newArray(T... elements)
T - the generic type of the elementselements - the optional elements that will be in the returned array.public static Integer[] newRangeArray(int start, int end)
Integer array with the given range that is defined through start and
end. For instance if the start is 5 and the end is 9 the resulted array will be [5,6,7,8,9]start - The number to startend - The number to end minus oneInteger array@SafeVarargs public static boolean[] newBooleanArray(boolean... elements)
elements - the optional primitive boolean values that will be in the returned array of
primitive boolean values array.@SafeVarargs public static byte[] newByteArray(byte... elements)
elements - the optional primitive byte values that will be in the returned array of primitive
byte values array.@SafeVarargs public static char[] newCharArray(char... elements)
elements - the optional primitive character values that will be in the returned array of
primitive character values array.@SafeVarargs public static int[] newIntArray(int... elements)
elements - the optional primitive integer values that will be in the returned array of
primitive integer values array.@SafeVarargs public static long[] newLongArray(long... elements)
elements - the optional primitive long values that will be in the returned array of primitive
long values array.@SafeVarargs public static float[] newFloatArray(float... elements)
elements - the optional primitive float values that will be in the returned array of
primitive float values array.@SafeVarargs public static double[] newDoubleArray(double... elements)
elements - the optional primitive double values that will be in the returned array of
primitive double values array.@SafeVarargs public static short[] newShortArray(short... elements)
elements - the optional primitive short values that will be in the returned array of
primitive short values array.Copyright © 2015–2019 Alpha Ro Group UG (haftungsbeschrÀngt). All rights reserved.