public enum OccupationCode extends java.lang.Enum<OccupationCode>
Enum Constant and Description |
---|
FREE
Abschnitt frei.
|
OCCUPIED
Abschnitt belegt.
|
Modifier and Type | Method and Description |
---|---|
int |
getOccupationCode()
Diese Methode gibt den Gleisbelegungscode als Integer zurück, so wie er von den Microcontrollern gemeldet wird.
|
static OccupationCode |
getOccupationCode(int code)
Diese Methode wandelt die Integer-Variante eines Gleisbelegungscodes in eine Enum-Instanz um.
|
static boolean |
isFree(int code)
Diese Methode wandelt einen gegebenen Code in einen Boolean um und
ermittelt, ob er einem
Gleis freientspricht. |
static boolean |
isOccupied(int code)
Diese Methode wandelt einen gegebenen Code in einen Boolean um und
ermittelt, ob er einem
Gleis belegtentspricht. |
static OccupationCode |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static OccupationCode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final OccupationCode FREE
public static final OccupationCode OCCUPIED
public static OccupationCode[] values()
for (OccupationCode c : OccupationCode.values()) System.out.println(c);
public static OccupationCode 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 int getOccupationCode()
public static OccupationCode getOccupationCode(int code)
code
- Der Integer-WertCodeNotFoundException
- Wenn zum Gleisbelegungscode keine Enum-Instanz gefunden wurde.public static boolean isOccupied(int code)
Gleis belegtentspricht.
code
- Der auszuwertende Code.public static boolean isFree(int code)
Gleis freientspricht.
code
- Der auszuwertende Code.Copyright © 2011 all committers of this modelrailway project