@Test public void testIsValidIPv6Cidr() throws Exception { assertThat(isValidIPv6Cidr("2001:db8:a0b:12f0:0:0:0:1/123"), is(true)); assertThat(isValidIPv6Cidr("2001:db8:a0b:12f0::1/124"), is(true)); assertThat(isValidIPv6Cidr("::1/125"), is(true)); assertThat(isValidIPv6Cidr("2001:db8::/126"), is(true)); assertThat(isValidIPv6Cidr("2001:db8:a0b:12f0:0:0:0:1/133"), is(false)); assertThat(isValidIPv6Cidr("2001:db8:a0b:12f0::1/-1"), is(false)); assertThat(isValidIPv6Cidr("::1/blah"), is(false)); }
public static boolean isValidIPv6Cidr(String cidr) { return cidr.matches(IPv6_CIDR); }
HostAndIpValidator { public static boolean isValidIPv6Cidr(String cidr) { return cidr.matches(IPv6_CIDR); } }
HostAndIpValidator { public static boolean isValidIPv6Cidr(String cidr) { return cidr.matches(IPv6_CIDR); }  }
HostAndIpValidator { public static boolean isValidIPv6Cidr(String cidr) { return cidr.matches(IPv6_CIDR); }  static boolean isValidHost(String host); static boolean isValidIPv4(String ipAddress); static boolean isValidIPv4Cidr(String cidr); static boolean isValidIPv6(String ipAddress); static boolean isValidIPv6(String ipAddress, boolean brackets); static boolean isValidIPv6Cidr(String cidr); static String getIPv4Suffix(); static String getIPv6Suffix(); }
HostAndIpValidator { public static boolean isValidIPv6Cidr(String cidr) { return cidr.matches(IPv6_CIDR); }  static boolean isValidHost(String host); static boolean isValidIPv4(String ipAddress); static boolean isValidIPv4Cidr(String cidr); static boolean isValidIPv6(String ipAddress); static boolean isValidIPv6(String ipAddress, boolean brackets); static boolean isValidIPv6Cidr(String cidr); static String getIPv4Suffix(); static String getIPv6Suffix();  }