Package cs1302.gameutil
Enum Class Token
- All Implemented Interfaces:
- Serializable,- Comparable<Token>,- Constable
A 
    
   Diagram of the  
  
Token object can be used to represent a player or a player's item in a game.
 cs1302.gameutil.Token enumeration.- Related CSCI 1302 projects:
- cs1302-c4-alpha
- 
Nested Class SummaryNested classes/interfaces inherited from class java.lang.EnumEnum.EnumDesc<E extends Enum<E>>
- 
Enum Constant SummaryEnum Constants
- 
Method SummaryModifier and TypeMethodDescriptionstatic String[]names()Returns an array containing the names of the constants of this enum class, in the order they are declared.Return the colorful string representation of thisTokenobject.Return the plain string representation of thisTokenobject.toString()Return a colorful string representation of thisTokenobject.static TokenReturns the enum constant of this class with the specified name.static Token[]values()Returns an array containing the constants of this enum class, in the order they are declared.
- 
Enum Constant Details- 
REDA red token.
- 
GREENA green token.
- 
YELLOWA yellow token.
- 
BLUEA blue token.
- 
PURPLEA purple token.
- 
CYANA cyan token.
 
- 
- 
Method Details- 
valuesReturns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
 
- 
valueOfReturns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
- IllegalArgumentException- if this enum class has no constant with the specified name
- NullPointerException- if the argument is null
 
- 
namesReturns an array containing the names of the constants of this enum class, in the order they are declared.- Returns:
- an array containing the names of the constants of this enum class, in the order they are declared
 
- 
toStringReturn a colorful string representation of thisTokenobject. The return value of thistoStringmethod is the same astoColorString().- Overrides:
- toStringin class- Enum<Token>
- Returns:
- the same value as toColorString()
- See Also:
 
- 
toColorStringReturn the colorful string representation of thisTokenobject.- Returns:
- the colorful string representation of this Tokenobject
- See Also:
 
- 
toPlainStringReturn the plain string representation of thisTokenobject.- Returns:
- the plain string representation of this Tokenobject
- See Also:
 
 
-