List of utility methods to do Array Create
CharSequence | array(CharSequence... args) array StringBuilder array = new StringBuilder(); array.append('['); if (args.length > 0) { array.append(args[0]); for (int i = 1; i < args.length; i++) { array.append(", ").append(args[i]); array.append(']'); return array.toString(); |
T[] | array(final T... array) Creates an array from the given objects. return array;
|
T[] | array(final T... elements) Shortcut to create an array of objects. return elements;
|
byte[] | array(int... rest) array int len = rest.length; byte bs[] = new byte[len]; for (int i = 0; i < len; ++i) { bs[i] = (byte) rest[i]; return bs; |
byte[] | array(int... values) Helper fonction for building bytes array. byte[] array = new byte[values.length]; for (int i = 0; i < array.length; i++) { array[i] = (byte) values[i]; return array; |
String | array(int[] array, int index) array if ((array == null) || (index >= array.length) || (index < 0)) { return EMPTY; return (array[index] != 0) ? CHECKED : EMPTY; |
T[] | array(Object... objects) array return as(objects);
|
Object[] | array(Object... val) array return val; |
String[] | array(String str) array return new String[] { str }; |
String[] | array(String... strings) Returns an array of strings from the supplied var-args. if (strings == null) return new String[0]; String[] ret = new String[strings.length]; for (int i = 0; i < strings.length; ret[i] = strings[i], i++) ; return ret; |