Interface Conditional.OnCondition<T>

Type Parameters:
T - the observed value type
Enclosing interface:
Conditional<T>

public static interface Conditional.OnCondition<T>
Specifies what action to take on a given condition.
  • Method Details

    • run

      Conditional<T> run(Runnable runnable)
      Adds a Runnable to run when the condition is met.
      Parameters:
      runnable - the runnable to run
      Returns:
      the Conditional for further configuration
    • accept

      Conditional<T> accept(Consumer<? super T> consumer)
      Adds a Consumer to call when the condition is met.
      Parameters:
      consumer - the consumer to call with the observed value
      Returns:
      the Conditional for further configuration