public final class Ip4Prefix extends IpPrefix
| Modifier and Type | Field and Description | 
|---|---|
static int | 
MAX_MASK_LENGTH  | 
static IpAddress.Version | 
VERSION  | 
IPV4_LINK_LOCAL_PREFIX, IPV4_MULTICAST_PREFIX, IPV6_LINK_LOCAL_PREFIX, IPV6_MULTICAST_PREFIX, MAX_INET_MASK_LENGTH, MAX_INET6_MASK_LENGTH| Modifier and Type | Method and Description | 
|---|---|
Ip4Address | 
address()
Returns the IPv4 address value of the prefix. 
 | 
static Ip4Prefix | 
valueOf(byte[] address,
       int prefixLength)
Converts a byte array and a prefix length into an IPv4 prefix. 
 | 
static Ip4Prefix | 
valueOf(int address,
       int prefixLength)
Converts an integer and a prefix length into an IPv4 prefix. 
 | 
static Ip4Prefix | 
valueOf(Ip4Address address,
       int prefixLength)
Converts an IPv4 address and a prefix length into an IPv4 prefix. 
 | 
static Ip4Prefix | 
valueOf(String address)
Converts a CIDR (slash) notation string (e.g., "10.1.0.0/16")
 into an IPv4 prefix. 
 | 
contains, contains, equals, getIp4Prefix, getIp6Prefix, hashCode, isIp4, isIp6, isMulticast, prefixLength, toString, valueOf, valueOf, versionpublic static final IpAddress.Version VERSION
public static final int MAX_MASK_LENGTH
public Ip4Address address()
public static Ip4Prefix valueOf(int address, int prefixLength)
address - an integer representing the IPv4 addressprefixLength - the prefix lengthIllegalArgumentException - if the prefix length value is invalidpublic static Ip4Prefix valueOf(byte[] address, int prefixLength)
address - the IPv4 address value stored in network byte orderprefixLength - the prefix lengthIllegalArgumentException - if the prefix length value is invalidpublic static Ip4Prefix valueOf(Ip4Address address, int prefixLength)
address - the IPv4 addressprefixLength - the prefix lengthIllegalArgumentException - if the prefix length value is invalidpublic static Ip4Prefix valueOf(String address)
address - an IP prefix in string form (e.g., "10.1.0.0/16")IllegalArgumentException - if the arguments are invalid