public static boolean isAddressInAnyOf(final @Nonnull Ipv6 address, final @Nonnull Set<Ipv6> addresses, final @Nonnull Set<Ipv6Range> ranges)
    {
        return addresses.stream().anyMatch(a->a.equals(address)) || ranges.stream().anyMatch(r->r.contains(address));
    }
Checks if the provided address is matched by any of the addresses or address ranges.

@param address The address to look up.
@param addresses the address-values to compare the provided address with.
@param ranges the range-values to compare the provided address with.
@return <tt>true</tt> if the address is found in the addresses or ranges, otherwise <tt>false</tt>.
xmppserver/src/main/java/org/jivesoftware/util/IpUtils.java