Package net.n1da.dev.euler.helper.poker
Enum Suit
- java.lang.Object
-
- java.lang.Enum<Suit>
-
- net.n1da.dev.euler.helper.poker.Suit
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<Suit>
,java.lang.constant.Constable
public enum Suit extends java.lang.Enum<Suit>
Defines the four suits of a standard card game.- Since:
- 16.08.2016 18:19:20
- Author:
- Nico Danneberg
-
-
Field Summary
Fields Modifier and Type Field Description private int
value
Stores the internal numeric value.
-
Constructor Summary
Constructors Modifier Constructor Description private
Suit(int val)
Creates a new suit but only by internal access.
-
Method Summary
Modifier and Type Method Description int
getValue()
Just returns the numericvalue
.static Suit
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static Suit[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Constructor Detail
-
Suit
private Suit(int val)
Creates a new suit but only by internal access.- Parameters:
val
- the numeric value of the new suit- See Also:
value
-
-
Method Detail
-
values
public static Suit[] 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 Suit 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 returns the numericvalue
.- Returns:
- the numeric value
-
-