@Test public void testCreateInvalidIp() { _thrown.expect(IllegalArgumentException.class); Ip.create(1L << 32); }
public static Ip create(long ipAsLong) { checkArgument(ipAsLong <= 0xFFFFFFFFL, "Invalid IP value: %s", ipAsLong); Ip ip = new Ip(ipAsLong); return CACHE.getUnchecked(ip); }
Ip implements Comparable<Ip>, Serializable { public static Ip create(long ipAsLong) { checkArgument(ipAsLong <= 0xFFFFFFFFL, "Invalid IP value: %s", ipAsLong); Ip ip = new Ip(ipAsLong); return CACHE.getUnchecked(ip); } }
Ip implements Comparable<Ip>, Serializable { public static Ip create(long ipAsLong) { checkArgument(ipAsLong <= 0xFFFFFFFFL, "Invalid IP value: %s", ipAsLong); Ip ip = new Ip(ipAsLong); return CACHE.getUnchecked(ip); } private  Ip(long ipAsLong); }
Ip implements Comparable<Ip>, Serializable { public static Ip create(long ipAsLong) { checkArgument(ipAsLong <= 0xFFFFFFFFL, "Invalid IP value: %s", ipAsLong); Ip ip = new Ip(ipAsLong); return CACHE.getUnchecked(ip); } private  Ip(long ipAsLong); static boolean getBitAtPosition(Ip ip, int position); static boolean getBitAtPosition(long bits, int position); static Ip numSubnetBitsToSubnetMask(int numBits); static @Nonnull Optional<Ip> tryParse(@Nonnull String text); @JsonCreator static Ip parse(String ipAsString); static Ip create(long ipAsLong); long asLong(); @Override int compareTo(Ip rhs); @Override boolean equals(@Nullable Object o); Ip getClassMask(); int getClassNetworkSize(); Ip getNetworkAddress(int subnetBits); @Override int hashCode(); Ip inverted(); int numSubnetBits(); @Nonnull IpIpSpace toIpSpace(); @Override @JsonValue String toString(); boolean valid(); Prefix toPrefix(); }
Ip implements Comparable<Ip>, Serializable { public static Ip create(long ipAsLong) { checkArgument(ipAsLong <= 0xFFFFFFFFL, "Invalid IP value: %s", ipAsLong); Ip ip = new Ip(ipAsLong); return CACHE.getUnchecked(ip); } private  Ip(long ipAsLong); static boolean getBitAtPosition(Ip ip, int position); static boolean getBitAtPosition(long bits, int position); static Ip numSubnetBitsToSubnetMask(int numBits); static @Nonnull Optional<Ip> tryParse(@Nonnull String text); @JsonCreator static Ip parse(String ipAsString); static Ip create(long ipAsLong); long asLong(); @Override int compareTo(Ip rhs); @Override boolean equals(@Nullable Object o); Ip getClassMask(); int getClassNetworkSize(); Ip getNetworkAddress(int subnetBits); @Override int hashCode(); Ip inverted(); int numSubnetBits(); @Nonnull IpIpSpace toIpSpace(); @Override @JsonValue String toString(); boolean valid(); Prefix toPrefix(); static final Ip AUTO; static final Ip FIRST_CLASS_A_PRIVATE_IP; static final Ip FIRST_CLASS_B_PRIVATE_IP; static final Ip FIRST_CLASS_C_PRIVATE_IP; static final Ip FIRST_CLASS_E_EXPERIMENTAL_IP; static final Ip FIRST_MULTICAST_IP; static final Ip MAX; static final Ip ZERO; }