public class IPv4 extends Object implements Comparable<IPv4>
Inet4Address
that is comparable to allow its use in other data objects such as TreeMap or
Range| Constructor and Description |
|---|
IPv4(Inet4Address address) |
IPv4(long ip)
Deprecated.
|
IPv4(String ip)
Deprecated.
use
IPv4.fromString() |
| Modifier and Type | Method and Description |
|---|---|
static Range<IPv4> |
cidrRange(String cidr)
Parses the provided CIDR string and produces a closed
Range encapsulating all IPv4 addresses between
the network and broadcast addresses in the subnet represented by the CIDR. |
int |
compareTo(IPv4 o) |
static DiscreteDomain<IPv4> |
discreteDomain() |
boolean |
equals(Object o) |
static IPv4 |
fromString(String addr)
Generates a new IPv4 instance from the provided address.
|
T |
getAddress() |
long |
getValue()
Deprecated.
|
int |
hashCode() |
byte[] |
toByteArray() |
String |
toString() |
public IPv4(Inet4Address address)
@Deprecated public IPv4(String ip)
IPv4.fromString()@Deprecated public IPv4(long ip)
@Deprecated public long getValue()
public int compareTo(IPv4 o)
compareTo in interface Comparable<IPv4>public static IPv4 fromString(String addr)
InetAddress.getByName().public static Range<IPv4> cidrRange(String cidr)
Range encapsulating all IPv4 addresses between
the network and broadcast addresses in the subnet represented by the CIDR.public static DiscreteDomain<IPv4> discreteDomain()
public T getAddress()
public byte[] toByteArray()
Copyright © 2015 Calrissian. All rights reserved.