Lunisolar Magma
What is it?
A library of functional interfaces for Java 8 (now 11), concentrated on ability to handle checked exceptions (throwing lambda) and/or primitive types, supplemented with assertion classes, builders and some additional classes.
Features
- More of functional interfaces
- More primitive types supported
- More combinations of arguments.
- List of interfaces:
- Support for throwing lambda expressions.
- Support for exception handling
- Default and static functions
- including simple validations (throwIf)
- With AssertJ assertions
- With builders
- Thus, reducing number of cases where:
- You cannot directly reference method
- JVM cannot optimize code better (although nothing is guaranteed)
- Tuples
- For each function that has a domain there exists in addition to that function a tuple class (e.g. Pair, Triple).
- Java 'monads'
Most of the above goals adds to the actual number of interfaces so this is not very tinny library as one would think.
Download
Artifacts are available in Maven Central.
For your production code:
- eu.lunisolar.magma:magma-func:3.0.0
- eu.lunisolar.magma:magma-func-builder:3.0.0
- eu.lunisolar.magma:magma-func-supp:3.0.0
For your test code:
Code repository
Code is hosted at github: repository