Commit graph

106 commits

Author SHA1 Message Date
f0be463028 Add Result.toMaybe() and Result.invert() 2018-06-24 22:36:02 +01:00
8ec3069d1d Suppress warning for unchecked cast 2018-06-24 08:16:54 +01:00
e9184f88bf Add Result.orElseThrow() 2018-06-24 08:16:24 +01:00
05aa6fb323 Add Result.fromMaybe(Maybe, Supplier<Exception>) 2018-06-23 22:29:47 +01:00
62a61213cc Added Result.maybe() 2018-06-23 18:22:05 +01:00
47193e6480 Add Result.map() 2018-06-23 18:14:19 +01:00
846bc88e4f Add comments to Maybe example in README 2018-06-23 07:35:48 +01:00
d6d17a6682 Split Maybe interface into MaybeOptional and MaybeStream
Also deprecated Maybe.fromOptional(Optional)
2018-06-22 23:53:25 +01:00
5bf0fcbdf9 Add Maybe.stream() 2018-06-22 23:17:25 +01:00
dba536d3d0 Add additional use case sample tests for Result 2018-06-22 17:39:22 +01:00
1977c47590 Replace type specifier in Result constructor with diamond operator 2018-06-22 07:09:21 +01:00
bf8e383229 Move Maybe into maybe package 2018-06-21 18:59:31 +01:00
95d5837e31 More upgrade and update tests to match new assertj error messages 2018-06-21 18:48:04 +01:00
470cd2fc24 Add Result<T> 2018-06-21 17:52:07 +01:00
c545eed3f3 Use new assertj 3.9.0 method 2018-03-02 23:32:33 +00:00
0424e93997 Suppress warnings 2018-03-02 23:32:07 +00:00
80023809a4 Add test for normal Mon.factory() behaviour 2018-03-02 23:32:07 +00:00
0f93915297 Reduce npath complexity of Mon.equals 2018-03-02 23:32:07 +00:00
11a63baa9f
BeanBuilder (#18)
* Add BeanBuilder

* Upgrade kemitix-parent to 5.1.0

* Add kemitix-checkstyle:tile:4.0.1

* Upgrade kemitix-maven-tiles to 0.5.2

* Build with java 1.8

* Downgrade surefire to 2.20 from the broken 2.02.1 in kemitix-maven-tiles

* Add javadoc and rename parameters
2018-02-28 15:00:00 +00:00
5064af2408 Clean up and clarify lambda parameters 2017-12-12 23:35:39 +00:00
a50db9ad67 Add Around combinator 2017-12-12 23:27:09 +00:00
edd95ac48a Fix javadoc typos 2017-12-12 23:19:48 +00:00
f2cb8b18a3 Add After combinator 2017-12-12 22:56:36 +00:00
d6ead54649 Add Before combinator 2017-12-12 22:55:29 +00:00
c750b94801 Remove incomplete Identity Test 2017-12-10 17:16:03 +00:00
d082215b12 Add tests for equality 2017-12-10 16:53:41 +00:00
dc89a0962f Use static import of nothing() 2017-12-10 16:33:49 +00:00
e711184628 Remove copy of documentation tests 2017-12-10 16:24:56 +00:00
e0eb0614c3 Add Maybe, Just, Nothing 2017-12-10 16:11:12 +00:00
41f9227afd Allow Functor.map() to return type-safe Functor subclasses 2017-12-10 10:40:31 +00:00
ec482211e0 Add missing test shouldNotBeEqualWhenValuesAreNotTheSame 2017-12-09 19:23:23 +00:00
a215c9c137 Remove redundant unchecked warning 2017-12-09 17:38:35 +00:00
ba4380fe98 Clarify that toString(), equals() and hashCode() all delegate to value 2017-12-09 17:38:04 +00:00
27019b23c1 Update and clarify TypeAlias tests 2017-12-09 17:35:18 +00:00
3c2b7dd5a1 Make TypeAlias.getValue() public again
Another revert from 0.3.0. TypeAlias is not meant to be monadic in any form.
It is a simple alias for another (non-generic) type.
2017-12-09 17:26:29 +00:00
2f16ab6714 Remove explicit type as a constructor parameter
This rolls back the change made for 0.3.0, reverting the API for TypeAlias
2017-12-09 17:25:01 +00:00
f49df2d895 Remove need in equals() for explicit type 2017-12-09 17:23:14 +00:00
9d31ca2694 Make TypeAlias.getValue() private 2017-11-26 11:35:25 +00:00
770467c1d5 TypeAlias requires explicit type class as parameter
TypeAlias makes use of map() and getValue() internally.
2017-11-26 11:33:36 +00:00
daa9775d6a Update TypeAliasTests to not use deprecated TypeAlias.getValue() 2017-11-26 09:38:35 +00:00
d60aedb930 Deprecate TypeAlias.getValue() in favour of map() 2017-11-26 09:33:49 +00:00
b5b11982e1 TypeAlias: prevent map() from being overridden 2017-10-19 18:45:45 +01:00
1e8941b030 TypeAlias: allow getValue() to be overridden 2017-10-19 18:42:55 +01:00
4c85e56c80 TypeAlias.map(): added 2017-10-07 18:56:38 +01:00
1046b6c5ae entities: add static builder and constructors and make previous revision Optional 2017-09-30 16:46:49 +01:00
cf723da38a Functor: clean up javadoc 2017-09-30 15:41:08 +01:00
3d8ebfeed6 Mon: make map() and flatMap() final
Also remove map() javadoc that is now in Functor.
2017-09-19 23:11:18 +01:00
fdc4cad4e4 Functor: rewrite map() javadoc 2017-09-19 23:10:31 +01:00
ccf3a11157 MonTest: apply stepdown rule to methods 2017-09-19 23:09:28 +01:00
c93ec60a31 TypeAliasTest: Avoid calling toString() on String objects 2017-09-18 22:46:12 +01:00
b3c6520067 {Identity,Mon}Test: JUnit tests should include asserts 2017-09-18 20:40:53 +01:00
141d508138 {Address,Customer,TypeAliasTest}: use explicit scoping 2017-09-18 20:23:01 +01:00
991dfda653 TypeAlias<T> 2017-09-16 22:34:45 +01:00
a14d87fd18 Identity<T> implements Functor<T> 2017-09-16 22:34:45 +01:00
0c178e8821 Mon<T> implements Functor<T> 2017-09-16 22:34:44 +01:00
b1066bb4b0 Functor<T> 2017-09-16 22:34:44 +01:00