Commit graph

34 commits

Author SHA1 Message Date
1992db49f1 Suppress unchecked cast 2018-03-13 18:46:44 +00:00
3a1e51aa9f Apply PMD and Checkstyle updates 2018-03-13 18:29:41 +00:00
66a0222253 Suppress PMD.ShortMethodName for or() methods 2018-03-13 18:00:59 +00:00
ac3e253bf2 Value: secondary clauses now use Supplier's to enable short circuiting 2018-03-13 17:53:16 +00:00
efc1705a6c Condition: secondary clauses now use Supplier's to enable short circuiting 2018-03-13 17:23:03 +00:00
d1ca0b039f Add missing generic types 2018-03-13 17:23:03 +00:00
ab47d4cad7 Suppress false-positive PMD error 2018-03-13 17:23:03 +00:00
779a64427e Add missing generic types 2018-03-13 17:23:03 +00:00
f596984fa5 Fix PMD warnings 2018-03-07 23:18:57 +00:00
b5a225af69 pmd: suppress short method name warning 2018-03-07 23:17:59 +00:00
b6801cf89e Replace Runnable with new Action interface 2018-03-07 23:17:59 +00:00
d9e3401658 Value: add missing javadoc 2017-08-26 23:11:10 +01:00
a1d9f17faf Value: add where() with Supplier<T> parameters
* Add `<T> Value.where(boolean, Supplier<T>, Supplier<T>)`
* Add `Optional<T> Value.where(boolean, Supplier<T>)`
2017-08-26 23:03:13 +01:00
844ba49c76 Value: Avoid danger of JVM-level deadlock during initialisation 2017-08-26 20:39:39 +01:00
62e4d56c9a Condition: avoid danger of JVM-level deadlock during initialisation 2017-08-26 19:14:24 +01:00
767b966d1a ValueTest: use val and have assertions in tests
Codacy's PMD check 'JUnit tests should include assert() or fail()'
insists on the assert being in the actual test method itself.
2017-08-26 18:34:03 +01:00
a78f6de32b ConditionalTest: tidy up 2017-08-26 16:41:47 +01:00
fd947df855 ConditionalTest: helper methods to 'asserThat...' 2017-08-26 16:41:47 +01:00
3e86a62de1 Condition.TrueCondition.otherwise: comment that it does nothing 2017-08-26 16:41:47 +01:00
357335779e Value: cache True/FalseValueClauses
Rather than create a new transient object every time when they can be
stateless singletons.
2017-04-24 13:35:02 +01:00
07f4af3425 Value: use lombok to replace constructor 2017-04-24 13:34:36 +01:00
47d0b8f78d Value: clean up unneeded generics type parameters 2017-04-23 17:55:08 +01:00
ce42e9dcbe Value: add javadoc 2017-04-23 17:52:15 +01:00
6a5ac40f47 ValueTest: remove ambiguity on then() and otherwise() parameters
Both are Supplier<T>.
2017-04-23 17:14:46 +01:00
06c9487eea Value: rewrite using strong chaining logic
Return values from each step restrict next chained method(s) available.
2017-04-23 17:11:37 +01:00
598f69a65b Value: add initial implementation 2017-04-23 16:53:30 +01:00
22c23e7e4a ConditionalTest: more tests for whereNot(), andNot() and orNot() 2017-04-22 07:47:01 +01:00
dcf1847def Condition: remove use of 'if' internaly
By using a look-up map for true and false the only branch in the code
is removed.
2017-04-22 07:40:40 +01:00
826dcc17ca ConditionalTest: more tests 2017-04-21 18:37:14 +01:00
ca49a94a7d ConditionalTest: clean up helper methods 2017-04-21 18:10:14 +01:00
14c494ffdd Condition: remove unnecessare object instantiation
Only one each, true and false, Condition object needed.
2017-04-21 14:38:12 +01:00
29232d4e71 Condition: overload otherwise to allow if-then-else-if behaviour 2017-04-21 14:28:54 +01:00
fe355a3850 Condition: add whereNot(), andNot() and orNot() 2017-04-21 12:16:54 +01:00
0fbb4f62b6 Initial commit 2017-04-21 10:55:11 +01:00