Package dev.kitteh.factions.upgrade
Interface LeveledValueProvider
- All Known Implementing Classes:
LeveledValueProvider.Equation,LeveledValueProvider.LevelMap
@AvailableSince("4.0.0")
@NullMarked
public sealed interface LeveledValueProvider
permits LeveledValueProvider.Equation, LeveledValueProvider.LevelMap
Provider of per-level values for upgrade variables and costs.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordExpression-based calculator of value.static final recordMap-based value provider. -
Method Summary
Modifier and TypeMethodDescriptionget(int level) Gets the value at the given level.default booleansupportsUpToLevel(int level) Gets if the upgrade supports the given level (and all levels up to it).
-
Method Details
-
get
Gets the value at the given level.- Parameters:
level- level for which to get the value- Returns:
- value at the given level
-
supportsUpToLevel
default boolean supportsUpToLevel(int level) Gets if the upgrade supports the given level (and all levels up to it).- Parameters:
level- level to test- Returns:
- true if this provider supports all levels up to and including the given level
-