Code example for Range

Methods: hasLowerBoundhasUpperBoundlowerEndpointupperEndpoint

        this.cidr = Rule.CIDR_ALL;
        return this;
    public RuleBuilder ports(Range<Integer> ports) {
        checkArgument(ports.hasUpperBound(), "ports should have a closed upper bound");
        checkArgument(ports.hasLowerBound(), "ports should have a closed lower bound ");
        checkArgument(ports.lowerEndpoint() > 0, "ports should be a positive range");
        checkArgument(ports.upperEndpoint() < 65535, "ports upper bound should less than 65535");
        this.ports = checkNotNull(ports, "ports is null");
        return this;
    public RuleBuilder ports(int lowerPort, int upperPort) {
        return ports(Ranges.closed(lowerPort, upperPort));
    public RuleBuilder port(int port) {
Connect your IDE to all the code out there  Get Codota for Java