Interface FunctionalCounter.Builder<T>

Type Parameters:
T - type of the state object
All Superinterfaces:
Meter.Builder<FunctionalCounter.Builder<T>,FunctionalCounter>, Wrapper
Enclosing interface:
FunctionalCounter

public static interface FunctionalCounter.Builder<T> extends Meter.Builder<FunctionalCounter.Builder<T>,FunctionalCounter>
Builder for a FunctionalCounter.
See Also:
  • Method Details

    • stateObject

      T stateObject()
      Returns the state object which would supply the counter value.
      Returns:
      state object
    • fn

      Function<T,Long> fn()
      Returns the function which, when applied to the state object, returns the counter value.
      Returns:
      function returning the counter value