List of utility methods to do List Concatenate
Long | ByteConcatenator(List Byte Concatenator long ret = 0; int size = instructionbytes.size(); for (int i = size - 1; i > (size - 1 - num); i--) { ret = ret << 8; ret += (0x00000000000000FFL & instructionbytes.get(i)); return ret; |
List | concat(Collection extends Collection Concatenate the collection of lists passed as argument into a new array list. int size = 0; for (Collection<T> list : lists) { size += list.size(); List<T> result = new ArrayList<T>(size); for (Collection<T> list : lists) { result.addAll(list); return result; |
List | concat(Collection concat List<T> result = new ArrayList<>(list1); result.addAll(list2); return result; |
byte[] | concat(final byte[] result, final List concat if (result == null || result.length == 0) return result; int pos = 0; for (final byte[] buffer : buffers) { System.arraycopy(buffer, 0, result, pos, buffer.length); pos += buffer.length; return result; ... |
List | concat(final Collection extends T>... lists) Concatenates a number of Collections into a single List ArrayList<T> al = new ArrayList<T>(); for (Collection<? extends T> list : lists) if (list != null) al.addAll(list); return al; |
List | concat(final List concat if (list1 == null || list2 == null) throw new NullPointerException("Not initizalized lists"); List<E> concat = new ArrayList<E>(list1.size() + list2.size()); concat.addAll(list1); concat.addAll(list2); return concat; |
String | concat(List list) concat if (list.size() > 0) { final StringBuilder result = new StringBuilder(); Iterator iter = list.iterator(); while (iter.hasNext()) { result.append(iter.next().toString()); if (iter.hasNext()) { result.append("."); return result.toString(); } else { return ""; |
List extends T> | concat(List extends T> l1, List extends T> l2) concat List<T> list = new ArrayList<>(); list.addAll(l1); list.addAll(l2); return list; |
List | concat(List extends T> list1, List extends T> list2) concat if (list1 == null && list2 == null) { return null; final List<T> result = new ArrayList<>(); if (list1 != null) result.addAll(list1); if (list2 != null) result.addAll(list2); ... |
String | concat(List> list, String delim) Used to turn a list into a string with the specified delimiter. String ret = list.get(0) + ""; for (int i = 1; i < list.size(); i++) { ret = ret + delim + list.get(i); return ret; |