|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | ||||||||
java.lang.Objectjava.lang.Enum<ComponentType>
robocode.naval.ComponentType
public enum ComponentType
Describes what the component represents. It assigns a type value.
Note: When you subtract the bitmask from the same series of that of the component from its type, you will end with an index starting from the number 1.
| Enum Constant Summary | |
|---|---|
COMBI_BITMASK
The bitmask for the combination series. |
|
COMBI_RADAR_WEAPON
This component represents a combination between a radar and a weapon. |
|
MINE_BITMASK
|
|
MINE_STANDARD
|
|
RADAR_BITMASK
The bitmask for the radar series. |
|
RADAR_LONG_DYNAMIC
The long range radar that can rotate around its own Z-axe. |
|
RADAR_LONG_STATIC
The long range radar fixed towards a certain angle. |
|
RADAR_SHORT_DYNAMIC
The short range radar that can rotate around its own Z-axe. |
|
RADAR_SHORT_STATIC
The short range radar fixed towards a certain angle. |
|
UNDEFINED
The initial state of a component. |
|
UNKNOWN
The type of the component is not know to us. |
|
WEAPON_BITMASK
The bitmask of the weapon series. |
|
WEAPON_PORT
The weapon on the left side of the ship. |
|
WEAPON_PROW
The weapon on the front end of the ship. |
|
WEAPON_STARBOARD
The weapon on the right side of the ship. |
|
WEAPON_STERN
The weapon on the back end of the ship. |
|
| Method Summary | |
|---|---|
boolean |
fromSeries(ComponentType bitMask)
Determines if the type matches a certain bitmask series. |
static ComponentType |
getValue(int value)
Get the CI value matching the given integer value. |
int |
toInt()
Get the integer value of the component type. |
static ComponentType |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static ComponentType[] |
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, toString, valueOf |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Enum Constant Detail |
|---|
public static final ComponentType UNDEFINED
public static final ComponentType UNKNOWN
public static final ComponentType WEAPON_BITMASK
public static final ComponentType WEAPON_PROW
public static final ComponentType WEAPON_STARBOARD
public static final ComponentType WEAPON_STERN
public static final ComponentType WEAPON_PORT
public static final ComponentType RADAR_BITMASK
public static final ComponentType RADAR_LONG_STATIC
public static final ComponentType RADAR_LONG_DYNAMIC
public static final ComponentType RADAR_SHORT_STATIC
public static final ComponentType RADAR_SHORT_DYNAMIC
public static final ComponentType MINE_BITMASK
public static final ComponentType MINE_STANDARD
public static final ComponentType COMBI_BITMASK
public static final ComponentType COMBI_RADAR_WEAPON
| Method Detail |
|---|
public static ComponentType[] values()
for (ComponentType c : ComponentType.values()) System.out.println(c);
public static ComponentType valueOf(String name)
name - the name of the enum constant to be returned.
IllegalArgumentException - if this enum type has no constant
with the specified name
NullPointerException - if the argument is nullpublic static ComponentType getValue(int value)
value - The integer value of the component.
CI of the component.public int toInt()
public boolean fromSeries(ComponentType bitMask)
bitMask - The series to whom it has to belong.
true if this ComponentType is a
member of the given series; false otherwise.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | ||||||||