Package net.blueva.arcade.api.stats
Enum StatPeriod
- All Implemented Interfaces:
Serializable,Comparable<StatPeriod>
Represents time periods for statistic tracking and leaderboards.
Stat periods allow tracking player performance over different time frames, enabling both historical all-time records and current seasonal competitions.
-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic StatPeriodParses a stat period from its string ID.id()Gets the string identifier for this period.static StatPeriodReturns the enum constant of this type with the specified name.static StatPeriod[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
ALLTIME
All-time statistics tracking from the beginning.This period includes all historical data without any time restrictions. Used for lifetime achievement tracking and permanent leaderboards.
-
YEARLY
Yearly statistics that reset annually.Tracks performance within the current calendar year. Used for annual seasons and yearly competitions.
-
MONTHLY
Monthly statistics that reset each month.Tracks performance within the current calendar month. Used for monthly competitions and short-term leaderboards.
-
-
Method Details
-
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
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:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
id
Gets the string identifier for this period.- Returns:
- the period ID
-
fromId
Parses a stat period from its string ID.- Parameters:
input- the period ID string (case-insensitive)- Returns:
- the matching StatPeriod, or null if not found
-