List of utility methods to do List Concatenate
List | concatenate(List
Convert the list of lists into a single list List<T> result = new ArrayList<T>(); for (List<T> list : lists) { result.addAll(list); return result; |
List | concatenate(List concatenate List<Object> returnList = new ArrayList(); if (list1.size() == 0) { return list2; } else if (list2.size() == 0) { return list1; } else if ((list1.size() > 1 && list2.size() > 1 && list1.size() != list2.size())) { returnList.add(list1.get(0).toString() + list2.get(0).toString()); } else if (list1.size() == list2.size()) { ... |
String | concatenate(List Join a list of URI fragments into a URI using '/' as a separator. StringBuffer buf = new StringBuffer(); for (int i = 0; i < components.size(); i++) { if (i > 0 && buf.charAt(buf.length() - 1) != '/' && components.get(i).charAt(0) != '/') buf.append('/'); buf.append(components.get(i)); return buf.toString(); |
String | concatenate(List Concatenates a list of string values. StringBuilder sb = new StringBuilder(); boolean isFirst = true; for (String string : list) { if (isFirst) { isFirst = false; } else { sb.append(", "); sb.append(string); return sb.toString(); |
String | concatenate(List Concatenate a list with items separated with a space. StringBuilder cmdsb = new StringBuilder(); for (String s : strings) { cmdsb.append(s); cmdsb.append(" "); return cmdsb.toString(); |
String | concatenate(List concatenate StringBuilder sb = new StringBuilder(); xs.forEach(ss -> sb.append(ss)); return sb.toString(); |
List | concatenate(List The given lists are not modified. if (a.isEmpty()) { return b; if (b.isEmpty()) { return a; List<T> l = new ArrayList<>(a.size() + b.size()); l.addAll(a); ... |
String | concatenate(List concatenate if (contents == null || contents.isEmpty()) return null; String concatenation = ""; for (Object content : contents) { concatenation += content.toString() + separator; return concatenation.substring(0, concatenation.length() - separator.length()); |
List | concatenate(List Concatenates multiple lists into one new list. if (lists == null) return new ArrayList<>(); List<T> result = new ArrayList<>(); for (List<T> l : lists) { if (l != null) result.addAll(l); return result; ... |
String[] | concatenate(String[] selectors, List concatenate if (lessExtends != null) { int off = selectors.length; selectors = Arrays.copyOf(selectors, off + lessExtends.size()); for (int i = 0; i < lessExtends.size(); i++) { selectors[off + i] = lessExtends.get(i); return selectors; ... |