List of utility methods to do List Create
String | createReleasesString(List create Releases String if (tagsList.size() == 1) { return tagsList.remove(0); } else { return tagsList.remove(0) + ", " + createReleasesString(tagsList); |
double[] | createResponse(String inputLabel, List Creates network output vector (response) for the specified image data double[] response = new double[imageLabels.size()]; int i = 0; for (String imageLabel : imageLabels) { if (inputLabel.startsWith(imageLabel)) { response[i] = 1d; } else { response[i] = 0d; i++; return response; |
List | createSingletonList(T element) create Singleton List List<T> result = new ArrayList<T>(); result.add(element); return result; |
List | createSourceExtensionList(Map Transforms the map of source extensions into a list of source extension sorted by the source class name of the source extension. List<String> sourceClassNames = new ArrayList<String>(sourceExtensionMap.keySet()); Collections.sort(sourceClassNames); List<E> list = new ArrayList<E>(sourceClassNames.size()); for (String sourceClassName : sourceClassNames) { E sourceExtension = sourceExtensionMap.get(sourceClassName); list.add(sourceExtension); return list; ... |
String | createSpaceDelimitedString(List create Space Delimited String StringBuffer buffer = new StringBuffer(); for (int index = 0; index < stringList.size(); index++) { String id = stringList.get(index); buffer.append(id); if (index < (stringList.size() - 1)) buffer.append(' '); return buffer.toString(); ... |
ArrayList | createStringDummyList() create String Dummy List ArrayList<String> stringList = new ArrayList<>(); stringList.add("abc"); stringList.add("abc1"); stringList.add("abc2"); stringList.add("abc3"); stringList.add("abc4"); stringList.add("abc5"); return stringList; ... |
String | createStringFromIntArray(List create String From Int Array String ret = ("["); if (listOfNumbers != null) { for (int i = 0; i < listOfNumbers.size(); i++) { if (i != listOfNumbers.size() - 1) { ret += (listOfNumbers.get(i)); ret += ", "; } else { ret += listOfNumbers.get(i); ... |
String | createStringFromIntegerList(List Creates a comma separated string of integer values from a list of Integer StringBuffer buf = new StringBuffer(); if (lst != null && !lst.isEmpty()) { Iterator<Integer> it = lst.iterator(); while (it.hasNext()) { Integer day = it.next(); buf.append(day.toString()); if (it.hasNext()) { buf.append(","); ... |
ArrayList | CreateStringList(Collection Converts a generic collection of objects into a list of String objects. ArrayList<String> results = new ArrayList<String>(); for (Object value : values) results.add(String.valueOf(value)); return results; |
List | createStringList(String csvString) create String List List<String> result; if (csvString != null && !csvString.isEmpty()) { String[] schemaURLs = csvString.split(", ?"); result = Arrays.asList(schemaURLs); } else { result = new ArrayList<String>(0); return result; ... |