View Javadoc
1   package io.atlassian.fugue.extensions.step;
2   
3   import io.atlassian.fugue.extensions.functions.Predicate3;
4   import io.atlassian.fugue.extensions.functions.Predicate4;
5   import io.atlassian.fugue.extensions.functions.Predicate5;
6   import io.atlassian.fugue.extensions.functions.Predicate6;
7   
8   import java.util.function.BiPredicate;
9   import java.util.function.Predicate;
10  
11  final class TestUtils {
12  
13    private TestUtils() {
14      // do not instantiate
15    }
16  
17    static <A> Predicate<A> alwaysTrue() {
18      return a -> true;
19    }
20  
21    static <A, B> BiPredicate<A, B> alwaysTrue2() {
22      return (a, b) -> true;
23    }
24  
25    static <A, B, C> Predicate3<A, B, C> alwaysTrue3() {
26      return (a, b, c) -> true;
27    }
28  
29    static <A, B, C, D> Predicate4<A, B, C, D> alwaysTrue4() {
30      return (a, b, c, d) -> true;
31    }
32  
33    static <A, B, C, D, E> Predicate5<A, B, C, D, E> alwaysTrue5() {
34      return (a, b, c, d, e) -> true;
35    }
36  
37    static <A, B, C, D, E, F> Predicate6<A, B, C, D, E, F> alwaysTrue6() {
38      return (a, b, c, d, e, f) -> true;
39    }
40  
41    static <A> Predicate<A> alwaysFalse() {
42      return a -> false;
43    }
44  
45    static <A, B> BiPredicate<A, B> alwaysFalse2() {
46      return (a, b) -> false;
47    }
48  
49    static <A, B, C> Predicate3<A, B, C> alwaysFalse3() {
50      return (a, b, c) -> false;
51    }
52  
53    static <A, B, C, D> Predicate4<A, B, C, D> alwaysFalse4() {
54      return (a, b, c, d) -> false;
55    }
56  
57    static <A, B, C, D, E> Predicate5<A, B, C, D, E> alwaysFalse5() {
58      return (a, b, c, d, e) -> false;
59    }
60  
61    static <A, B, C, D, E, F> Predicate6<A, B, C, D, E, F> alwaysFalse6() {
62      return (a, b, c, d, e, f) -> false;
63    }
64  
65  }