public enum MomentumType extends java.lang.Enum<MomentumType>
Enum Constant and Description |
---|
HIGH_FRICTION
High friction means it does not keep momentum
(Car and bike movement)
|
LOW_FRICTION
Low friction means it keeps its momentum for a long time
(Hovercraft and helicopter movement)
|
MEDIUM_FRICTION
Medium friction means it keeps its momentum a little bit
(Boat movement)
|
Modifier and Type | Method and Description |
---|---|
static MomentumType |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static MomentumType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final MomentumType LOW_FRICTION
public static final MomentumType MEDIUM_FRICTION
public static final MomentumType HIGH_FRICTION
public static MomentumType[] values()
for (MomentumType c : MomentumType.values()) System.out.println(c);
public static MomentumType 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 null