class IPvXCondition extends EntitlementConditionAdaptor {

    @SuppressWarnings("unchecked")
    public String getRequestIp(Map env) {
        String ip = null;
        final Object requestIp = env.get(REQUEST_IP);

        if (requestIp instanceof Set) {
            Set<String> requestIpSet =  (Set<String>) requestIp;
            if (!requestIpSet.isEmpty()) {
                if (requestIpSet.size() > 1) {
                    debugWarning("Environment map {0} cardinality > 1. Using first from: {1}",
                            REQUEST_IP, requestIpSet);
                }
                ip = requestIpSet.iterator().next();
            }
        } else if (requestIp instanceof String) {
            ip = (String) requestIp;
        }

        if (StringUtils.isBlank(ip)) {
            debugWarning("Environment map {0} is null or empty", REQUEST_IP);
        }
        return ip;
    }

    protected  IPvXCondition(Debug debug, T initialStartIp, T initialEndIp, IPVersion version);
    protected  IPvXCondition(Debug debug, T initialStartIp, T initialEndIp, IPVersion version,
                            String startIp, String endIp, List<String> ipRange, List<String> dnsName);

}