public enum Role extends Enum<Role>
| Enum Constant and Description |
|---|
AGENT
Agent
|
EXPORTER
Exporter
|
INSPECTOR
Inspector
|
OTHER
Other role types
|
RECEIVER
Receiver
|
SENDER
Sender
|
| Modifier and Type | Method and Description |
|---|---|
static Role |
from(int code)
Builds a new Role type from an integer
|
int |
getCode()
Gets the role numeric code
|
static Role |
hostTypeByName(String name)
Builds a new Role type from a String (check HostTypes class for details)
|
boolean |
isWorker() |
String |
toString() |
static Role |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Role[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Role OTHER
public static final Role SENDER
public static final Role RECEIVER
public static final Role INSPECTOR
public static final Role AGENT
public static final Role EXPORTER
public static Role[] values()
for (Role c : Role.values()) System.out.println(c);
public static Role 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 int getCode()
public static Role from(int code)
code - the integer to build frompublic boolean isWorker()
This documentation was released into the public domain.