List of utility methods to do List Create
List | createStringList(String spaceDelimitedString) create String List String[] splitValues = spaceDelimitedString.split(" "); return Arrays.asList(splitValues); |
List | createStringListFromStringArr(String[] stringArr) Creates an list of Integers from an array of Strings if (stringArr == null) { return null; List<String> stringList = new ArrayList<String>(); for (int i = 0; i < stringArr.length; i++) { String part = stringArr[i]; if (part != null && !"".equals(part)) { stringList.add(part); ... |
List | createSubList(Collection> source, Class Create a sub-list by only picking up instances of the specified type. List<T> r = new ArrayList<T>(); for (Object item : source) { if (type.isInstance(item)) { r.add(type.cast(item)); return r; |
List | createSublist(final T[] elements, final Class extends List> listImplementation) create Sublist List<T> sublist; final List<T> asList = Arrays.asList(elements); try { sublist = listImplementation.newInstance(); sublist.addAll(asList); } catch (final InstantiationException e) { sublist = asList; } catch (final IllegalAccessException e) { ... |
String | createSymbolNameString_From_Parts(List create Symbol Name Strin Fro Parts if (descTagName_Parts == null) return null; StringBuffer descTagBuffer = new StringBuffer(); boolean firstPart = true; for (String part : descTagName_Parts) { if (!firstPart) descTagBuffer.append("."); else ... |
String | createTable(List create Table StringBuilder table = new StringBuilder(begin); if (datas == null) { throw new IllegalArgumentException("The data can not be null"); if (datas.size() % numColumns != 0) { throw new IllegalArgumentException( "The table could not be created becuase the data does not match the column size"); if (border > 0) { table.append("border=\"" + border + "\""); if (cellPadding > 0) { table.append("cellpadding=\"" + cellPadding + "\""); table.append(">"); if (headers != null && headers.length == numColumns) { table.append("<tr>"); for (String header : headers) { table.append("<th>" + header + "</th>"); table.append("</tr>"); int colIndex = 0; for (String data : datas) { if (colIndex == 0) { table.append("<tr>"); table.append("<td>" + data + "</td>"); colIndex++; if (colIndex == numColumns) { table.append("</tr>"); colIndex = 0; return table.toString(); |
String | createTagList(List create Tag List StringBuilder sb = new StringBuilder(); for (String string : tags) { sb.append(string); sb.append(separator); return sb.toString().substring(0, sb.length() - separator.length()); |
List | createTarget(List create Target return createTarget(labels, new HashMap<T, Double>()); |
List | createTargetSorted(List create Target Sorted return createTargetSorted(labels, new HashMap<T, Double>(), comp); |
void | createTuple(List
This recursive method is used by the computeCombinations() method. if (entries.size() == lists.size() - 1) { for (T t : lists.get(entries.size())) { List<T> tuple = new ArrayList<T>(entries); tuple.add(t); tuples.add(tuple); } else { for (T t : lists.get(entries.size())) { ... |