|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Objectjava.lang.Enum<SimEvents>
bcds.phison.SimEvents
public enum SimEvents
This enum class defines the events handled by the simulator.
Each enum has, in addition to its full (Java) name, an "external" short name (a.k.a. signature), so that CONN_REQUEST is the character 'c', for example.
Enum Constant Summary | |
---|---|
CONN_RELEASE
Connection release (short name is "r"). |
|
CONN_REQUEST
Connection request (short name is "c"). |
|
LINK_FAILURE
Link failure (short name is "fl"). |
|
LINK_REPAIR
Link repair (short name is "flr"). |
|
NODE_FAILURE
Node failure (short name is "fn"). |
|
NODE_REPAIR
Node repair (short name is "fnr"). |
|
TIMED_CALL
A schedule function activation. |
Method Summary | |
---|---|
static SimEvents |
getEnum(java.lang.String sig)
Returns the enum object that corresponds to a given short name ( sig ), or null if sig
does not correspond to any enum. |
java.lang.String |
getSignature()
Returns the enum's short name. |
java.lang.String |
toString()
Returns the enum name (Java) in lowercase. |
static SimEvents |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. |
static SimEvents[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final SimEvents CONN_REQUEST
public static final SimEvents CONN_RELEASE
public static final SimEvents LINK_FAILURE
public static final SimEvents LINK_REPAIR
public static final SimEvents NODE_FAILURE
public static final SimEvents NODE_REPAIR
public static final SimEvents TIMED_CALL
Method Detail |
---|
public static SimEvents[] values()
for (SimEvents c : SimEvents.values()) System.out.println(c);
public static SimEvents 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 name
java.lang.NullPointerException
- if the argument is nullpublic java.lang.String toString()
toString
in class java.lang.Enum<SimEvents>
public static SimEvents getEnum(java.lang.String sig)
sig
), or null if sig
does not correspond to any enum.
This method is needed because clients (such as
TrafficReader
) use short names
which is not the same as the enum name ("c" vs CONN_REQUEST).
Otherwise, we could
have just used Enum.valueOf()
.
public java.lang.String getSignature()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |