public enum Team extends java.lang.Enum<Team>
Since Team is a Java 1.5 enum, you can use it in switch
statements, it has all the standard enum methods (valueOf,
values, etc.), and you can safely use == for
equality tests.
| Enum Constant and Description |
|---|
A
Team A.
|
B
Team B.
|
NEUTRAL
Neutral robots.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
isPlayer()
Returns whether a robot of this team is a player-controlled entity
(team A or team B).
|
Team |
opponent()
Determines the team that is the opponent of this team.
|
static Team |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static Team[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Team A
public static final Team B
public static final Team NEUTRAL
public static Team[] values()
for (Team c : Team.values()) System.out.println(c);
public static Team 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 Team opponent()
1public boolean isPlayer()
1