public static boolean isAddressInAnyOf(final @Nonnull Ipv4 address, final @Nonnull Set<String> addressesAndRanges)
    {
        final Set<Ipv4> addresses = addressesAndRanges.stream().filter(IpUtils::isValidIpv4).map(Ipv4::of).collect(Collectors.toSet());
        final Set<Ipv4Range> ranges = addressesAndRanges.stream().filter(IpUtils::isValidIpv4Range).map(IpUtils::convertIpv4WildcardRangeToCidrNotation).map(Ipv4Range::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