class IpRange {
        private long start;
        private long end;

        public IpRange(String ip) {
            start = parseStart(ip);
            end = parseEnd(ip);
        }

        public IpRange(String startIp, String endIp) {
            start = parseStart(startIp);
            end = parseEnd(endIp);
        }

        private long parseStart(String ip) {
            int[] starts = { 0, 0, 0, 0 };
            return parse(starts, ip);
        }

        private long parseEnd(String ip) {<FILL_FUNCTION_BODY>}

        private long parse(int[] segments, String ip) {
            String[] ipSegments = ip.split("\\.");
            for (int i = 0; i < ipSegments.length; i++) {
                segments[i] = Integer.parseInt(ipSegments[i]);
            }
            long ret = 0;
            for (int i : segments) {
                ret += ret * 255L + i;
            }
            return ret;
        }

        public boolean isEnabled(String ip) {
            String[] ipSegments = ip.split("\\.");
            long ipInt = 0;
            for (String ipSegment : ipSegments) {
                ipInt += ipInt * 255L + Integer.parseInt(ipSegment);
            }
            return ipInt >= start && ipInt <= end;
        }
    }

            int[] ends = { 255, 255, 255, 255 };
            return parse(ends, ip);
        
<no_super_class>