List of utility methods to do List Clone
List | cloneList(List l) clone List ArrayList<Object> list = new ArrayList(); if (l == null) return null; for (Object o : l) { list.add(o); return list; |
List | cloneList(List sOriginal) clone List if (sOriginal == null) { return null; } else { return new ArrayList(sOriginal); |
List | cloneList(List clone List List<double[]> result = new ArrayList<double[]>(); for (double[] currArr : xData) { result.add(currArr.clone()); return result; |
List | cloneList(List clone List List<T> newList = new ArrayList<T>(); newList.addAll(curList); return newList; |
List | cloneList(List clone List return new ArrayList<>(l); |
List | cloneListExcludingAttribute(String attribute, List clone List Excluding Attribute List<String> clonedList = new ArrayList<>(attributes); clonedList.remove(attribute); return clonedList; |
List | cloneListOfStrings(List clone a list of string deep into elements List<String> clone = new ArrayList<String>(list.size()); for (String item : list) clone.add(cloneString(item)); return clone; |
List | cloneMerchantList(List merchantIDs) Clone the merchant ID list if (merchantIDs == null) return null; List lst = Collections.synchronizedList(new ArrayList()); String id; for (Iterator lt = merchantIDs.iterator(); lt.hasNext();) { id = (String) lt.next(); lst.add(new String(id)); return lst; |
ArrayList | cloneProbabilities(List clone Probabilities if (targetProbs != null && !targetProbs.isEmpty()) { ArrayList<Integer> copy = new ArrayList<Integer>(targetProbs.size()); for (int index = 0; index < targetProbs.size(); index++) { copy.add(targetProbs.get(index)); return copy; } else { return null; ... |
List | cloneStringList(List clone String List List<String> copiedList = new ArrayList<String>(); for (String s : list) { copiedList.add(s); return copiedList; |