public static Set<IndexedResolvedServiceAddress> from(final int index, final InetAddress[] addresses, final int port, final boolean isDirectTLS)
    {
        final Set<IndexedResolvedServiceAddress> result = new HashSet<>();
        for (InetAddress address : addresses) {
            result.add(new IndexedResolvedServiceAddress(index, address, port, isDirectTLS));
        }
        return result;
    }
A specialized {@link ResolvedServiceAddress} that can be ordered.

This class is (only) intended to be used by {@link HappyEyeballsResolver} which uses the ordering to generate results
in the order defined by SRV's 'priority' and 'weight' attributes.

@author Guus der Kinderen, guus@goodbytes.nl
xmppserver/src/main/java/org/jivesoftware/openfire/net/IndexedResolvedServiceAddress.java