Package net.n1da.dev.euler.helper.poker
Enum Value
- java.lang.Object
-
- java.lang.Enum<Value>
-
- net.n1da.dev.euler.helper.poker.Value
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<Value>
,java.lang.constant.Constable
public enum Value extends java.lang.Enum<Value>
Defines the 13 card values from TWO to ACE.- Since:
- 17.08.2016 19:15:11
- Author:
- Nico Danneberg
-
-
Constructor Summary
Constructors Modifier Constructor Description private
Value(int val, char txt)
Creates a new value with the given vaule and text by internal access only.
-
Method Summary
Modifier and Type Method Description int
getValue()
Just a getter for thevalue
java.lang.String
toString()
static Value
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static Value[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
TWO
public static final Value TWO
The 13 card values with both, a numeric value and a text representations.
-
THREE
public static final Value THREE
-
FOUR
public static final Value FOUR
-
FIFE
public static final Value FIFE
-
SIX
public static final Value SIX
-
SEVEN
public static final Value SEVEN
-
EIGHT
public static final Value EIGHT
-
NINE
public static final Value NINE
-
TEN
public static final Value TEN
-
JACK
public static final Value JACK
-
QUEEN
public static final Value QUEEN
-
KING
public static final Value KING
-
ACE
public static final Value ACE
-
-
Method Detail
-
values
public static Value[] values()
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Value 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
-
getValue
public int getValue()
Just a getter for thevalue
- Returns:
- the numeric value
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Enum<Value>
-
-