/** * Given a collection of string representation of hosts, return a list of * corresponding IP addresses in the textual representation. * * @param names * a collection of string representations of hosts * @return a list of corresponding IP addresses in the string format * @see #normalizeHostName(String) */ public static List<String> normalizeHostNames(Collection<String> names) { List<String> hostNames = new ArrayList<String>(names.size()); for (String name : names) { hostNames.add(normalizeHostName(name)); } return hostNames; } }
/** * Given a collection of string representation of hosts, return a list of * corresponding IP addresses in the textual representation. * * @param names * a collection of string representations of hosts * @return a list of corresponding IP addresses in the string format * @see #normalizeHostName(String) */ public static List<String> normalizeHostNames(Collection<String> names) { List<String> hostNames = new ArrayList<String>(names.size()); for (String name : names) { hostNames.add(normalizeHostName(name)); } return hostNames; } }