List of utility methods to do List Print
String | getGenBlueprintName(String slavenodelist, List get Gen Blueprint Name String blueprint; if (slavenodelist.isEmpty() && masterList.size() == 1) { blueprint = "blueprint1m"; } else if (masterList.size() == 1) { blueprint = "blueprint1mXd"; } else if (masterList.size() == 2) { blueprint = "blueprint2mXd"; } else { ... |
String | limitLengthOfPrintedList(Collection> list) Converts a list to a string that shows at most 100 elements. return limitLengthOfPrintedList(list, 100);
|
String | prettyList(final List pretty List if (list.isEmpty()) { return ""; final StringBuilder sb = new StringBuilder(list.size() * 10); for (final String s : list) { sb.append(s); sb.append(", "); return sb.substring(0, sb.length() - 2); |
String | prettyList(List> list) pretty List StringBuilder sb = new StringBuilder(); for (int i = 0; i < list.size(); i++) { sb.append(list.get(i).toString()); if (i < list.size() - 2) { sb.append(", "); } else if (i == list.size() - 2) { if (list.size() > 2) { sb.append(","); ... |
String | prettyPrint(List pretty Print if (userPermissions == null) { return ""; StringBuilder sb = new StringBuilder(""); if (userPermissions.contains("read")) { sb.append("R"); if (userPermissions.contains("write")) { ... |
void | prettyPrint(List Pretty prints a list of String arrays. if (!rows.isEmpty()) { final int numCol = rows.get(0).length; final int[] maxLength = new int[numCol]; Arrays.fill(maxLength, 0); for (String[] row : rows) { for (int i = row.length - 1; i >= 0; i--) { if (row[i] == null && maxLength[i] < 4) maxLength[i] = 4; ... |
String | prettyPrintArgv(List Given an argv array such as might be passed to execve(2), returns a string that can be copied and pasted into a Bourne shell for a similar effect. StringBuilder buf = new StringBuilder(); for (String arg : argv) { if (buf.length() > 0) { buf.append(' '); buf.append(shellEscape(arg)); return buf.toString(); ... |
String | prettyPrintList(Collection> objects, String separator) pretty Print List if (null == objects || objects.isEmpty()) { return ""; StringBuffer result = new StringBuffer(400); int curr = 0; for (Object mensagem : objects) { result.append(mensagem); if (++curr < objects.size()) { ... |
String | prettyPrintList(List Takes a list of integers and returns a conveniently formatted string. String result = ""; for (int i = 0; i < list.size(); i++) { result += list.get(i).toString(); if (i < list.size() - 1) { result += ITEM_DELIMITER; return result; ... |
void | prettyPrintWarningMessage(final List pretty print the warning message supplied for (final String line : message.split("\\r?\\n")) { final StringBuilder builder = new StringBuilder(line); while (builder.length() > TEXT_WARNING_WIDTH) { int space = getLastSpace(builder, TEXT_WARNING_WIDTH); if (space <= 0) { space = TEXT_WARNING_WIDTH; results.add(String.format("%s%s", TEXT_WARNING_PREFIX, builder.substring(0, space))); ... |