public static String fromIPv4AddressCollection(Collection<Integer> ipAddresses){
  if (ipAddresses == null)   return "null";
  StringBuffer sb=new StringBuffer();
  sb.append("[");
  for (  Integer ip : ipAddresses) {
    sb.append(fromIPv4Address(ip));
    sb.append(",");
  }
  sb.replace(sb.length() - 1,sb.length(),"]");
  return sb.toString();
}

public static String fromIPv4AddressCollection ( Collection < Integer > ipAddresses ) { if ( ipAddresses == null ) return "null" ; StringBuffer sb = new StringBuffer ( ) ; sb . append ( "[" ) ; for ( Integer ip : ipAddresses ) { sb . append ( fromIPv4Address ( ip ) ) ; sb . append ( "," ) ; } sb . replace ( sb . length ( ) - 1 , sb . length ( ) , "]" ) ; return sb . toString ( ) ; }
accepts a collection of ipv4 addresses as integers and returns a single string useful in tostring method ' s containing collections of ip addresses .
