Package com.mygdx.game.PowerUps
Enum PowerUpOperation
- java.lang.Object
-
- java.lang.Enum<PowerUpOperation>
-
- com.mygdx.game.PowerUps.PowerUpOperation
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<PowerUpOperation>
public enum PowerUpOperation extends java.lang.Enum<PowerUpOperation>
// Assessment 2 addition // For PowerUp requirement
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static PowerUpOperation
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static PowerUpOperation[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
replace
public static final PowerUpOperation replace
Replace the key value with a new value.
-
increment
public static final PowerUpOperation increment
Increment the key value by an amount.
-
decrement
public static final PowerUpOperation decrement
Decrement the key value by an amount.
-
multiply
public static final PowerUpOperation multiply
Multiply the key value by an amount.
-
divide
public static final PowerUpOperation divide
Divide the key value by an amount.
-
-
Method Detail
-
values
public static PowerUpOperation[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (PowerUpOperation c : PowerUpOperation.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static PowerUpOperation valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
-