public enum NetworkUtil extends Enum<NetworkUtil>
| Modifier and Type | Method and Description |
|---|---|
static int |
getAvailablePort()
Get a port number that's very likely to be available
|
static NetworkUtil |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static NetworkUtil[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static NetworkUtil[] values()
for (NetworkUtil c : NetworkUtil.values()) System.out.println(c);
public static NetworkUtil 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 static int getAvailablePort()
Copyright © 2023. All rights reserved.