public class StringCollectionToPrimitiveArray extends Object
| Modifier and Type | Field and Description |
|---|---|
static boolean[] |
EMPTY_ARRAY_BOOLEAN
An empty boolean array.
|
static byte[] |
EMPTY_ARRAY_BYTE
An empty byte array.
|
static char[] |
EMPTY_ARRAY_CHAR
An empty char array.
|
static double[] |
EMPTY_ARRAY_DOUBLE
An empty double array.
|
static float[] |
EMPTY_ARRAY_FLOAT
An empty float array.
|
static int[] |
EMPTY_ARRAY_INT
An empty int array.
|
static long[] |
EMPTY_ARRAY_LONG
An empty long array.
|
static short[] |
EMPTY_ARRAY_SHORT
An empty short array.
|
static String[] |
EMPTY_ARRAY_STRING
An empty string array.
|
| Constructor and Description |
|---|
StringCollectionToPrimitiveArray() |
| Modifier and Type | Method and Description |
|---|---|
boolean[] |
stringCollectionToBooleanArray(Collection<String> strings)
|
byte[] |
stringCollectionToByteArray(Collection<String> strings)
|
char[] |
stringCollectionToCharArray(Collection<String> strings)
|
double[] |
stringCollectionToDoubleArray(Collection<String> strings)
|
float[] |
stringCollectionToFloatArray(Collection<String> strings)
|
int[] |
stringCollectionToIntArray(Collection<String> strings)
|
long[] |
stringCollectionToLongArray(Collection<String> strings)
|
short[] |
stringCollectionToShortArray(Collection<String> strings)
|
String[] |
stringCollectionToStringArray(Collection<String> strings)
|
public static final String[] EMPTY_ARRAY_STRING
public static final byte[] EMPTY_ARRAY_BYTE
public static final short[] EMPTY_ARRAY_SHORT
public static final int[] EMPTY_ARRAY_INT
public static final long[] EMPTY_ARRAY_LONG
public static final float[] EMPTY_ARRAY_FLOAT
public static final double[] EMPTY_ARRAY_DOUBLE
public static final boolean[] EMPTY_ARRAY_BOOLEAN
public static final char[] EMPTY_ARRAY_CHAR
public String[] stringCollectionToStringArray(Collection<String> strings)
String Collection to a String array.
No further converts.
null values in the collection are allowed and will be null values in the array.public byte[] stringCollectionToByteArray(Collection<String> strings)
String Collection containing bytes to a String array.
Convert all entries using Byte.parseByte(String).
null values in the collection are not allowed and throw a NumberFormatException.strings - The Strings. Can be null.null, may be empty.public short[] stringCollectionToShortArray(Collection<String> strings)
String Collection containing shorts to a String array.
Convert all entries using Short.parseShort(String).
null values in the collection are not allowed and throw a NumberFormatException.strings - The Strings. Can be null.null, may be empty.public int[] stringCollectionToIntArray(Collection<String> strings)
String Collection containing ints to a String array.
Convert all entries using Integer.parseInt(String).
null values in the collection are not allowed and throw a NumberFormatException.strings - The Strings. Can be null.null, may be empty.public long[] stringCollectionToLongArray(Collection<String> strings)
String Collection containing longs to a String array.
Convert all entries using Long.parseLong(String).
null values in the collection are not allowed and throw a NumberFormatException.strings - The Strings. Can be null.null, may be empty.public float[] stringCollectionToFloatArray(Collection<String> strings)
String Collection containing floats to a String array.
Convert all entries using Float.parseFloat(String).
null values in the collection are not allowed and throw a NullPointerException.strings - The Strings. Can be null.null, may be empty.public double[] stringCollectionToDoubleArray(Collection<String> strings)
String Collection containing doubles to a String array.
Convert all entries using Double.parseDouble(String).
null values in the collection are not allowed and throw a NullPointerException.strings - The Strings. Can be null.null, may be empty.public boolean[] stringCollectionToBooleanArray(Collection<String> strings)
String Collection containing booleans to a String array.
Convert all entries using Boolean.parseBoolean(String).
null values in the collection are allowed and will be converted to a false value.strings - The Strings. Can be null.null, may be empty.public char[] stringCollectionToCharArray(Collection<String> strings)
String Collection containing chars to a String array.
Convert all entries using String.charAt(int).
null values in the collection are not allowed and throw a NullPointerException.strings - The Strings. Can be null.null, may be empty.Copyright © 2017. All rights reserved.