public static boolean isAddressInAnyOf(final @Nonnull Ipv6 address, final @Nonnull Set<String> addressesAndRanges)
    {
        final Set<Ipv6> addresses = addressesAndRanges.stream().filter(IpUtils::isValidIpv6).map(Ipv6::of).collect(Collectors.toSet());
        final Set<Ipv6Range> ranges = addressesAndRanges.stream().filter(IpUtils::isValidIpv6Range).map(Ipv6Range::parse).collect(Collectors.toSet());
        return isAddressInAnyOf(address, addresses, ranges);
    }
Checks if the provided address is matched by any of the addresses or address ranges.

@param address The address to look up.
@param addressesAndRanges the 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