public static enum Port.Protocol extends Enum<Port.Protocol>
| Modifier and Type | Method and Description |
|---|---|
static Port.Protocol |
getFromString(String protocolString)
Returns the
Port.Protocol given its string representation. |
String |
toString() |
static Port.Protocol |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Port.Protocol[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Port.Protocol TCP
public static final Port.Protocol UDP
public static Port.Protocol[] values()
for (Port.Protocol c : Port.Protocol.values()) System.out.println(c);
public static Port.Protocol valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic String toString()
toString in class Enum<Port.Protocol>public static Port.Protocol getFromString(@Nullable String protocolString)
Port.Protocol given its string representation.protocolString - the case insensitive string (e.g. "tcp", "udp")Port.Protocol with the corresponding name, or Protocol#TCP by default
if invalidCopyright © 2018. All rights reserved.