predicate method

Switcher<I, O> predicate(
  1. Predicate<I> predicate,
  2. Method<I, O> value
)

Implementation

Switcher<I, O> predicate(final Predicate<I> predicate, final Method<I, O> value) {
  return this..cases.putIfAbsent(predicate, () => value);
}