List of utility methods to do List to Array
String[] | toStringArray(List to String Array if (items == null) return new String[] {}; String[] arr = new String[items.size()]; for (int i = 0; i < items.size(); i++) { arr[i] = items.get(i); return arr; |
String[] | toStringArray(List to String Array return list.toArray(new String[0]); |
String[] | toStringArray(List to String Array String[] data = new String[list.size()]; for (int i = 0; i < data.length; i++) data[i] = list.get(i); return data; |
String[] | toStringArray(List to String Array return list.toArray(new String[list.size()]); |
String[] | toStringArraySafe(List list) to String Array Safe while (list.contains(null)) { list.remove(null); return ((List<String>) list).toArray(new String[list.size()]); |