Functional pebbles is a set of classes intended to facilitate programming functional style in Java. Many of the classes copy functionality from similarly named classes in Scala, others are static functions that mimic built-in Scala functionality. Unlike in well known vavr library Functional Pebbles classes behave exactly as they do in Scala. They are:
Try
(aka Error) monad.- Composable
TryFunction
Tuple
pair of values holding class.Collectionz
- additional utilities for collections.
For more information see Functional Pebbles Wiki.
To add as a dependency. In maven do
<dependency>
<groupId>xyz.devfortress.functional.pebbles</groupId>
<artifactId>functional-pebbles-core</artifactId>
<version>1.0.0</version>
<type>pom</type>
</dependency>
and in gradle
implementation 'xyz.devfortress.functional.pebbles:functional-pebbles-core:1.0.0'
Javadoc is available here https://javadoc.io/doc/xyz.devfortress.functional.pebbles/functional-pebbles-core