@Test(expected = IllegalArgumentException.class) public void shouldFailToParseCidrWhenIllegalPrefix() { Ipv6Range.parseCidr("ffce:abcd::/129"); }
public static Ipv6Range parseCidr(String cidrString) { int idx = cidrString.indexOf(SLASH); Validate.isTrue(idx != -1, "Argument [" + cidrString + "] is not a range or does not comply with the CIDR notation"); String address = cidrString.substring(0, idx); String prefix = cidrString.substring(idx + 1, cidrString.length()); return Ipv6Range.from(address).andPrefixLength(prefix); }
Ipv6Range extends AbstractIpRange<Ipv6, Ipv6Range> { public static Ipv6Range parseCidr(String cidrString) { int idx = cidrString.indexOf(SLASH); Validate.isTrue(idx != -1, "Argument [" + cidrString + "] is not a range or does not comply with the CIDR notation"); String address = cidrString.substring(0, idx); String prefix = cidrString.substring(idx + 1, cidrString.length()); return Ipv6Range.from(address).andPrefixLength(prefix); } }
Ipv6Range extends AbstractIpRange<Ipv6, Ipv6Range> { public static Ipv6Range parseCidr(String cidrString) { int idx = cidrString.indexOf(SLASH); Validate.isTrue(idx != -1, "Argument [" + cidrString + "] is not a range or does not comply with the CIDR notation"); String address = cidrString.substring(0, idx); String prefix = cidrString.substring(idx + 1, cidrString.length()); return Ipv6Range.from(address).andPrefixLength(prefix); } protected  Ipv6Range(Ipv6 start, Ipv6 end); }
Ipv6Range extends AbstractIpRange<Ipv6, Ipv6Range> { public static Ipv6Range parseCidr(String cidrString) { int idx = cidrString.indexOf(SLASH); Validate.isTrue(idx != -1, "Argument [" + cidrString + "] is not a range or does not comply with the CIDR notation"); String address = cidrString.substring(0, idx); String prefix = cidrString.substring(idx + 1, cidrString.length()); return Ipv6Range.from(address).andPrefixLength(prefix); } protected  Ipv6Range(Ipv6 start, Ipv6 end); static Ipv6RangeBuilder from(Ipv6 from); static Ipv6RangeBuilder from(BigInteger from); static Ipv6RangeBuilder from(String from); static Ipv6Range parse(String range); static Ipv6Range parseCidr(String cidrString); static Ipv6Range parseDecimalNotation(String range); @Override BigInteger size(); }
Ipv6Range extends AbstractIpRange<Ipv6, Ipv6Range> { public static Ipv6Range parseCidr(String cidrString) { int idx = cidrString.indexOf(SLASH); Validate.isTrue(idx != -1, "Argument [" + cidrString + "] is not a range or does not comply with the CIDR notation"); String address = cidrString.substring(0, idx); String prefix = cidrString.substring(idx + 1, cidrString.length()); return Ipv6Range.from(address).andPrefixLength(prefix); } protected  Ipv6Range(Ipv6 start, Ipv6 end); static Ipv6RangeBuilder from(Ipv6 from); static Ipv6RangeBuilder from(BigInteger from); static Ipv6RangeBuilder from(String from); static Ipv6Range parse(String range); static Ipv6Range parseCidr(String cidrString); static Ipv6Range parseDecimalNotation(String range); @Override BigInteger size();  }