Package customer
Enum Class CustomerType
- All Implemented Interfaces:
Serializable,Comparable<CustomerType>,Constable
Enum representing the types of customers, primarily used to determine betting limits.
Each customer type specifies a different maximum stake limit, which is represented by
the maxStake field. The stake limit varies by customer type as follows:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intThe maximum stake limit for this customer type. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateCustomerType(int maxStake) Initializes aCustomerTypewith a specific maximum stake limit. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the maximum stake limit for this customer type.static CustomerTypeReturns the enum constant of this class with the specified name.static CustomerType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
BASIC
Standard customer with a basic betting limit of 100 units. -
GOLD
Gold-level customer with a higher betting limit of 1,000 units. -
PLATINUM
Platinum-level customer with the highest betting limit of 2,000 units.
-
-
Field Details
-
maxStake
-
-
Constructor Details
-
CustomerType
private CustomerType(int maxStake) Initializes aCustomerTypewith a specific maximum stake limit.- Parameters:
maxStake- The maximum stake limit associated with this customer type.
-
-
Method Details
-
values
Returns 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
-
valueOf
Returns 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 nameNullPointerException- if the argument is null
-
getMaxStake
public int getMaxStake()Returns the maximum stake limit for this customer type.- Returns:
- The maximum stake allowed for this type of customer.
-