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 Classes
    Modifier and Type
    Interface
    Description
    static final record 
    Expression-based calculator of value.
    static final record 
    Map-based value provider.
  • Method Summary

    Modifier and Type
    Method
    Description
    get(int level)
    Gets the value at the given level.
    default boolean
    supportsUpToLevel(int level)
    Gets if the upgrade supports the given level (and all levels up to it).
  • Method Details

    • get

      BigDecimal get(int level)
      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