- java.lang.Object
-
- net.pincette.util.Cases<T,U>
-
public class Cases<T,U> extends Object
This lets you chain a number of predicates with functions. The value of the first function with a matching predicate is the result returned by theget
method. It can be used like this:Cases.<T, U>withValue(v).or(v -> test1, v -> v1).or(v -> test2, v -> v2).get();
- Since:
- 1.8
- Author:
- Werner Donné