List of utility methods to do List Print
void | printPerformanceStats(String message, List print Performance Stats Long max = Collections.max(iterationTimesInNanoseconds);
Long min = Collections.min(iterationTimesInNanoseconds);
System.out.format("%s: totalIterations=%d, min=%d us, max=%d us, avg=%d us.\n", message,
iterationTimesInNanoseconds.size(), min / 1000, max / 1000,
average(iterationTimesInNanoseconds) / 1000);
|
void | printQueryResults(List> res) Convenience method for printing query results. if (res == null || res.isEmpty()) System.out.println("Query result set is empty."); else { for (Object row : res) { if (row instanceof List) { System.out.print("("); List<?> l = (List) row; for (int i = 0; i < l.size(); i++) { ... |
void | printRules(List print Rules System.out.println("[" + clazz.getName() + "] applied rules: "); for (String rule : rules) { System.out.println(rule); |
void | printStats(final List print Stats System.out.println("N: " + shocktimes.size()); long sum = 0; for (final Long l : shocktimes) { sum += l; final double mean = (sum / (double) shocktimes.size()) / 1000000000.0; System.out.println("Mean: " + mean); double ss = 0; ... |
void | printStringList(List print String List String output = ""; for (String text : list) { output += " '" + text + "' "; System.out.println("###########" + name + "########## " + output); |
String | printStringList(List Prints the elements of a string list without leading and ending brackets. return listToPrint.toString().replace("[", "").replace("]", "").trim(); |
void | printStringList(List Prints a list of String to System.out.
Iterator<String> i = strings.iterator(); System.out.println("\nSize: " + strings.size() + "\n"); while (i.hasNext()) { System.out.println(i.next()); System.out.println("\n--------------------------------"); |
void | printTable(List print the table if (isNotProperTableData(data)) { return; int numColumns = data.get(0).split("\\s").length; int size = 0; for (int i = 0; i < numColumns; i++) { size += getColumnSize(data, i); int adjustedSize = size + 6 + (numColumns - 1) * 3; System.out.println(doubleHorizontalLine(adjustedSize)); for (int i = 0; i < data.size(); i++) { String line = data.get(i); System.out.print("||"); String[] columnData = line.split("\\s"); for (int j = 0; j < numColumns; j++) { System.out.print(" " + columnData[j] + getCellSpaces(data, j, columnData[j]) + " |"); System.out.println("|"); System.out.println(doubleHorizontalLine(adjustedSize)); |
void | printTopNTokens(LinkedList This function takes a sorted List as input and print top N elements Iterator<Entry<String, Integer>> iterator = list.descendingIterator(); int size = list.size() - 1; if (size < 0) { System.out.println("Empty Set"); return; System.out.format("\n%-20s%20s\n", "Token", "Frequency"); System.out.println("---------------------------------------------------------------------------------"); ... |
void | printTuple(List Print one tuple to stdout. System.out.println("Tuple:"); int i = 0; for (Object v : tuple) { if (v instanceof String) System.out.println(" Value[" + i + "]: " + (String) v); else if (v instanceof Integer) System.out.println(" Value[" + i + "]: " + v); i++; ... |