question: 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 ( ) ; }
target:  Accepts a collection of IPv4 addresses as integers and returns a single String useful in toString method's containing collections of IP addresses.