The ArrayConverter class provides methods to create an array from a set of values.
Description
The ArrayConverter class provides methods to create an array from a set of values. These values can be in the form of a list, a single value or a string of comma-delimited values.
Static methods
listToArray
Converts a list into an array object with an empty array as default.
Strings with comma-delimited values are split into array of strings.
See toArray
public static List
value: Object - list to convert.
returns: List
toArray
Converts a value into an array object with an empty array as default.
Single values are converted into arrays with a single element.
public static List
value: Object - value to convert.
returns: List
toArrayWithDefault
Converts a value into an array object with a specified default.
Single values are converted into arrays with a single element.
public static List
value: Object - value to convert.
defaultValue: List - default array object.
returns: List - list of objects.
toNullableArray
Converts a value into an array object.
Single values are converted into arrays with a single element.
public static List toNullableArray(Object value)
value: Object - value to convert.
returns: List - array object or null when value is null.