Commit graph

86 commits

Author SHA1 Message Date
e8989718f3 README.org: expand TypeAlias documentation and add TypeAlias.flatMap() 2018-07-16 20:56:56 +01:00
e5958ba432 Add Either (experimental) 2018-07-16 18:49:44 +01:00
9a6c58c835 Rewrite README and convert to org-mode
* MaybeTest use static import Maybe.*
* Maybe.orElseThrow() now returns value when is a Just
2018-07-15 20:59:49 +01:00
51f86884fb Add Maybe.isJust() and Maybe.isNothing() 2018-07-12 20:28:34 +01:00
d66c4c8502 Add Maybe.match(Consumer,Runnable) 2018-07-12 18:45:02 +01:00
c64284872c Rename Result.maybeThen() as Result.flatMapMaybe() 2018-07-10 22:46:22 +01:00
3c60da2735 * Add Result.maybeThen(Result<Maybe<T>>, Function) 2018-07-10 17:37:54 +01:00
9138cbba46 ResultTest: tidy up test names 2018-07-09 15:47:27 +01:00
a9beeacf0b Update ResultTest sample businessOperation 2018-07-09 15:24:28 +01:00
f6eb27450f Add thenWith(Function) 2018-07-09 08:00:53 +01:00
fb6b65e6de Add andThen(Function) 2018-07-08 19:46:45 +01:00
28564a2129 Add Result.recover(Function) and Result.onError(Consumer) 2018-07-07 23:02:02 +01:00
c5247d7c14 Add Maybe.ifNothing(Runnable) 2018-07-07 18:21:35 +01:00
7648967f8a TypeAlias: access own member fields directly 2018-07-05 07:27:17 +01:00
9923bbc880 Add Result.peek(Consumer) 2018-06-30 18:13:29 +01:00
248bda0b4f Add Result.of(Callable) to reduce boiler plate when calling 2018-06-30 16:24:06 +01:00
1e85a14165 Result.Err.equals(): test when error is different 2018-06-26 22:18:32 +01:00
3e80dded1d Move BeanBuilder to experimental package and allow multiple with() calls 2018-06-26 07:31:03 +01:00
2f5b01f460 Remove Identity 2018-06-26 07:22:32 +01:00
18aa6406ef Result extends Functor 2018-06-26 07:19:39 +01:00
1f986139bc Tidy up checkstyle violations 2018-06-26 07:13:48 +01:00
684cdc06ae New and updated hashcode tests 2018-06-26 07:10:07 +01:00
24a233db5c Implement Result.equals() and hashcode() 2018-06-25 22:51:18 +01:00
7e92129dfc Merge branch 'enhance-result'
* enhance-result:
  Result satisfies the three Monad Laws
  Maybe satisfies the three Monad Laws
  Collapse Maybe{Optional,Stream} into Maybe
  Remove Maybe.fromOptional(Optional)
  Add Result.toString() implementations
  Add Result.toMaybe() and Result.invert()
  Suppress warning for unchecked cast
  Add Result.orElseThrow()
  Add Result.fromMaybe(Maybe, Supplier<Exception>)
  Added Result.maybe()
  Add Result.map()
2018-06-25 22:46:26 +01:00
093e35b4c1 Result satisfies the three Monad Laws 2018-06-25 22:39:25 +01:00
5d39be36ff Maybe satisfies the three Monad Laws 2018-06-25 22:36:18 +01:00
2211182c7d Collapse Maybe{Optional,Stream} into Maybe 2018-06-25 22:06:05 +01:00
7a150066a9 Remove Maybe.fromOptional(Optional) 2018-06-25 21:59:24 +01:00
3496fa0972 Add Result.toString() implementations 2018-06-25 21:54:55 +01:00
a62b2c8920 Remove Maybe.fromOptional(Optional) 2018-06-25 07:16:12 +01:00
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