class TransportAddresses implements Iterable<InetSocketTransportAddress> {

    @Override
    public Iterator<InetSocketTransportAddress> iterator() {
        List<InetSocketTransportAddress> result = new LinkedList<>();

        for (String node : nodes) {
            InetSocketTransportAddress transportAddress = transformToInetAddress(node);
            result.add(transportAddress);
        }

        return result.iterator();
    }

      TransportAddresses(String[] nodes);

}