code: public static Address[] addressesFor(String[] hosts, int port) {
      Address[] hostAddresses = new Address[hosts.length];
      for (int i = 0; i < hosts.length; i++)
        hostAddresses[i] = new Address(hosts[i].trim(), port);
      return hostAddresses;
    }
docs: Returns an array of Addresses for the {@code hosts} and {@code port}.