private void printOutDefinedIPs(List<String> definedIPs){
  List<String> ipList=new ArrayList<>();
  for (  String ip : definedIPs) {
    if (ip.indexOf(':') != -1) {
      ipList.add("|- IPv6: " + ip);
    }
 else {
      ipList.add("|- IPv4: " + ip);
    }
  }
  Collections.sort(ipList);
  for (  String ip : ipList) {
    log.info(ip);
  }
}

private void printOutDefinedIPs ( List < String > definedIPs ) { List < String > ipList = new ArrayList < > ( ) ; for ( String ip : definedIPs ) { if ( ip . indexOf ( ':' ) != - 1 ) { ipList . add ( "|- IPv6: " + ip ) ; } else { ipList . add ( "|- IPv4: " + ip ) ; } } Collections . sort ( ipList ) ; for ( String ip : ipList ) { log . info ( ip ) ; } }
prints out the given list of defined ip addresses . the example is : < p > | - ipv4 : 192 . 168 . 1 . 6 < br > | - ipv4 : 127 . 0 . 0 . 1 < br > | - ipv6 : fe80 : 0 : 0 : 0 : 221 : 5cff : fe1d : ffdf % 3 < br > | - ipv6 : 0 : 0 : 0 : 0 : 0 : 0 : 0 : 1 % 1
