Interface ValueProvider<T>

Type Parameters:
T - type of value
All Known Subinterfaces:
Flip, Mutator<T>, Rotation, Shiftable<T>

public interface ValueProvider<T>
Represents a value provider.
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    Refresh the current value by calling the valueProvider()
    Get the current value
    void
    value(T value)
    Change the current value.
    Returns a new value
  • Method Details

    • value

      void value(@NotNull T value)
      Change the current value.
      Parameters:
      value - value to set
    • value

      @NotNull T value()
      Get the current value
      Returns:
      the value
    • valueProvider

      T valueProvider()
      Returns a new value
      Returns:
      new value
    • refresh

      default void refresh()
      Refresh the current value by calling the valueProvider()