@Test public void testToInt() { Ip4Address ipAddress; ipAddress = Ip4Address.valueOf("1.2.3.4"); assertThat(ipAddress.toInt(), is(0x01020304)); ipAddress = Ip4Address.valueOf("0.0.0.0"); assertThat(ipAddress.toInt(), is(0)); ipAddress = Ip4Address.valueOf("255.255.255.255"); assertThat(ipAddress.toInt(), is(-1)); }
public int toInt() { ByteBuffer bb = ByteBuffer.wrap(super.toOctets()); return bb.getInt(); }
Ip4Address extends IpAddress { public int toInt() { ByteBuffer bb = ByteBuffer.wrap(super.toOctets()); return bb.getInt(); } }
Ip4Address extends IpAddress { public int toInt() { ByteBuffer bb = ByteBuffer.wrap(super.toOctets()); return bb.getInt(); } private  Ip4Address(byte[] value); }
Ip4Address extends IpAddress { public int toInt() { ByteBuffer bb = ByteBuffer.wrap(super.toOctets()); return bb.getInt(); } private  Ip4Address(byte[] value); int toInt(); static Ip4Address valueOf(int value); static Ip4Address valueOf(byte[] value); static Ip4Address valueOf(byte[] value, int offset); static Ip4Address valueOf(InetAddress inetAddress); static Ip4Address valueOf(String value); static Ip4Address makeMaskPrefix(int prefixLength); static Ip4Address makeMaskedAddress(final Ip4Address address,
                                               int prefixLength); }
Ip4Address extends IpAddress { public int toInt() { ByteBuffer bb = ByteBuffer.wrap(super.toOctets()); return bb.getInt(); } private  Ip4Address(byte[] value); int toInt(); static Ip4Address valueOf(int value); static Ip4Address valueOf(byte[] value); static Ip4Address valueOf(byte[] value, int offset); static Ip4Address valueOf(InetAddress inetAddress); static Ip4Address valueOf(String value); static Ip4Address makeMaskPrefix(int prefixLength); static Ip4Address makeMaskedAddress(final Ip4Address address,
                                               int prefixLength); static final IpAddress.Version VERSION; static final int BYTE_LENGTH; static final int BIT_LENGTH; }