private void calculate(String mask) {
        Matcher matcher = cidrPattern.matcher(mask);

        if (matcher.matches()) {
            matchAddress(matcher);

            /* Create a binary netmask from the number of bits specification /x */
            rangeCheck(Integer.parseInt(matcher.group(5)), 0, NBITS);
        } else {
            throw new IllegalArgumentException("Could not parse [" + mask + "]");
        }
    }
private void calculate ( String mask ) { Matcher matcher = cidrPattern . matcher ( mask ) ; if ( matcher . matches ( ) ) { matchAddress ( matcher ) ; rangeCheck ( Integer . parseInt ( matcher . group ( 5 ) ) , 0 , NBITS ) ; } else { throw new IllegalArgumentException ( "Could not parse [" + mask + "]" ) ; } }
/*
Initialize the internal fields from the supplied CIDR mask