public static enum IPAddress.IPVersion extends java.lang.Enum<IPAddress.IPVersion>
Modifier and Type | Method and Description |
---|---|
static IPAddress.IPVersion |
fromByteLength(int length) |
boolean |
isIPv4() |
boolean |
isIPv6() |
static IPAddress.IPVersion |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static IPAddress.IPVersion[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final IPAddress.IPVersion IPV4
public static final IPAddress.IPVersion IPV6
public static IPAddress.IPVersion[] values()
for (IPAddress.IPVersion c : IPAddress.IPVersion.values()) System.out.println(c);
public static IPAddress.IPVersion valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic boolean isIPv4()
public boolean isIPv6()
public static IPAddress.IPVersion fromByteLength(int length)
length
- java.lang.IllegalArgumentException
- if not the byte length of IPv4 or IPv6 (4 or 16)