void (List<NetworkIF> list) { StringBuilder sb = new StringBuilder("Network Interfaces:"); if (list.isEmpty()) { sb.append(" Unknown"); } else { for (NetworkIF net : list) { if (net.getIfAlias() != null) { sb.append("\n ").append(net); } } } info.add(sb.toString()); }