@Test public void testParseInvalidPrefixBits() { thrown.expect(IllegalArgumentException.class); IpPrefix.parse("1.2.3.4/33"); }
@Nonnull public static IpPrefix parse(@Nonnull String text) { ConcreteInterfaceAddress concreteInterfaceAddress = ConcreteInterfaceAddress.parse(text); return new IpPrefix( concreteInterfaceAddress.getIp(), concreteInterfaceAddress.getNetworkBits()); }
IpPrefix implements Serializable { @Nonnull public static IpPrefix parse(@Nonnull String text) { ConcreteInterfaceAddress concreteInterfaceAddress = ConcreteInterfaceAddress.parse(text); return new IpPrefix( concreteInterfaceAddress.getIp(), concreteInterfaceAddress.getNetworkBits()); } }
IpPrefix implements Serializable { @Nonnull public static IpPrefix parse(@Nonnull String text) { ConcreteInterfaceAddress concreteInterfaceAddress = ConcreteInterfaceAddress.parse(text); return new IpPrefix( concreteInterfaceAddress.getIp(), concreteInterfaceAddress.getNetworkBits()); } IpPrefix(Ip ip, int prefixLength); }
IpPrefix implements Serializable { @Nonnull public static IpPrefix parse(@Nonnull String text) { ConcreteInterfaceAddress concreteInterfaceAddress = ConcreteInterfaceAddress.parse(text); return new IpPrefix( concreteInterfaceAddress.getIp(), concreteInterfaceAddress.getNetworkBits()); } IpPrefix(Ip ip, int prefixLength); @Nonnull static IpPrefix parse(@Nonnull String text); Ip getIp(); Prefix getPrefix(); }
IpPrefix implements Serializable { @Nonnull public static IpPrefix parse(@Nonnull String text) { ConcreteInterfaceAddress concreteInterfaceAddress = ConcreteInterfaceAddress.parse(text); return new IpPrefix( concreteInterfaceAddress.getIp(), concreteInterfaceAddress.getNetworkBits()); } IpPrefix(Ip ip, int prefixLength); @Nonnull static IpPrefix parse(@Nonnull String text); Ip getIp(); Prefix getPrefix(); static final IpPrefix ZERO; }