List of utility methods to do List Create
List | createDoubleList(double[] values) create Double List List<Double> list = new ArrayList<>(); for (double v : values) { list.add(v); return list; |
List | createDriverSheetNames(List driverBeans) create Driver Sheet Names List sheetNames = new ArrayList(); for (int i = 0; i < driverBeans.size(); i++) { Map map = (Map) driverBeans.get(i); String bizid = String.valueOf(map.get("BIZ_ID")); String name = String.valueOf(map.get("OWNERNAME")); sheetNames.add(name + bizid); return sheetNames; ... |
List
| createEmptyAdjacencyList(int n) Creates an empty graph represented as an adjacency list of size n if (n < 0) throw new IllegalArgumentException("n cannot be negative; received: " + n); List<List<Integer>> graph = new ArrayList<>(n); for (int i = 0; i < n; i++) graph.add(new ArrayList<>()); return graph; |
List | createEmptyList(Class create Empty List return new ArrayList<T>(); |
List>[] | createEmptyListArray(int size) create Empty List Array List<?>[] array = new ArrayList<?>[size]; for (int i = 0; i < size; i++) array[i] = new ArrayList<T>(); return array; |
List | createEmptyListOfType(List> original, boolean sameSize) create Empty List Of Type if (original instanceof ArrayList) { return sameSize ? new ArrayList<T>(original.size()) : new ArrayList<T>(); try { return original.getClass().newInstance(); } catch (Exception e) { return sameSize ? new ArrayList<T>(original.size()) : new ArrayList<T>(); |
String | createEntireInStatement(List create Entire In Statement StringBuilder builder = new StringBuilder(" IN ("); for (String value : values) { builder.append("'" + value + "',"); return builder.subSequence(0, builder.length() - 1).toString() + ")"; |
String | createErrorStringFromList(List create Error String From List String errorString = ""; if (errorList != null && errorList.size() > 0) { if (errorList.size() == 1) { errorString = errorList.get(0).toString(); } else { for (int i = 0; i < errorList.size(); i++) { String str = errorList.get(i).toString() + "<br/>"; errorString += str; ... |
String | createGrantScript(List create Grant Script StringBuilder result = new StringBuilder(); for (String currentObject : objectsToGrant) { result.append("GRANT select ON SYS." + currentObject.replace("v$", "v_$") + " TO " + grantee + ";\n"); return result.toString(); |
String | createHTMLList(String list, String link, boolean APPEND, String title) Convert a line separated list into an HTML list of links. String buffer = ""; Scanner scanner = new Scanner(list); String line, endpoint; int tmpi; if (title != null) { buffer += "<h1>" + title + "</h1>\n"; buffer += "<ul>\n"; ... |