Java Utililty Methods List Print

List of utility methods to do List Print

Description

The list of methods to do List Print are organized into topic(s).

Method

StringprettyRoleOutput(List roles, final String delimiter)
pretty Role Output
StringBuilder roleStr = new StringBuilder();
if (roles != null) {
    for (String role : roles) {
        roleStr.append(role + delimiter);
if (roleStr.length() > 0) {
    roleStr.deleteCharAt(roleStr.length() - 1);
...
voidprint(Collection> collections)
print
for (Collection<T> c : collections) {
    for (T t : c) {
        System.out.print(t);
        System.out.print(" ");
    System.out.println();
voidprint(int totalErrors, int totalTechnical, int totalSuccess, List filesWithErrorsList)
print
if (totalErrors > 0) {
    System.out.println("Files with failed tests : ");
    for (String string : filesWithErrorsList) {
        System.out.println("- " + string);
System.out.println("Technical errors: " + totalTechnical);
System.out.println("Failures: " + totalErrors);
...
voidprint(Iterable list)
print
for (Object obj : list)
    System.out.println(obj);
voidprint(List A, String mode)
print
for (int i = 0; i < A.size(); i++) {
    System.out.print(A.get(i) + mode);
System.out.println();
Stringprint(List items)
print
StringBuilder builder = new StringBuilder();
for (E item : items) {
    builder.append(item).append(", ");
return builder.length() > 2 ? builder.substring(0, builder.length() - 2) : builder.toString();
voidprint(List list)
print
for (E li : list)
    System.out.println(li);
Listprint(List list)
print
System.out.println(list.getClass().toString());
for (Integer integer : list) {
    System.out.println(integer);
System.out.println("===================");
return list;
voidprint(List list)
print
System.out.println("List: [");
for (T t : list) {
    System.out.println(t);
System.out.println("]");
voidprint(Map> map)
print
for (Iterator<Entry<String, List<String>>> iterator = map.entrySet().iterator(); iterator.hasNext();) {
    Map.Entry<String, List<String>> entry = (Map.Entry<String, List<String>>) iterator.next();
    String key = entry.getKey();
    List<String> values = entry.getValue();
    System.out.println(key);
    for (String string : values) {
        System.out.println("\t" + string);