|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Objectjava.lang.Enum<BonusType>
edu.ou.pacman.util.BonusType
public enum BonusType
List of possible bonus types for the pac-man game board.
Enum Constant Summary | |
---|---|
BANANAS
|
|
CHERRIES
|
|
GRAPES
|
|
NO_BONUS
|
|
ORANGES
|
|
STRAWBERRIES
|
Method Summary | |
---|---|
static java.awt.image.BufferedImage |
bonusImage(BonusType type)
Return an image for the specified bonus type. |
java.awt.image.BufferedImage |
image()
Return the image for this bonus type. |
static BonusType |
random()
Return a random BonusType. |
static BonusType |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. |
static BonusType[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
Methods inherited from class java.lang.Enum |
---|
compareTo, equals, 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 BonusType BANANAS
public static final BonusType CHERRIES
public static final BonusType GRAPES
public static final BonusType NO_BONUS
public static final BonusType ORANGES
public static final BonusType STRAWBERRIES
Method Detail |
---|
public static BonusType[] values()
for (BonusType c : BonusType.values()) System.out.println(c);
public static BonusType 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 name
java.lang.NullPointerException
- if the argument is nullpublic static java.awt.image.BufferedImage bonusImage(BonusType type)
type
- - The type to use
public java.awt.image.BufferedImage image()
public static BonusType random()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |