Vavr is a functional library for Java 8+ that provides immutable data types and functional control structures.
Functional programming is not only a new set of tools to get accustomed with but also a new paradigm to understand.
>> Introduction to Vavr
Starting at the top – this is the high-level overview of the whole library and tools we can find there.
>> Guide to the Persistent Collections API
Vavr’s Collections API its one of its biggest advantages – collections are not only immutable but also persistent.
>> Guide to Try
Here, we dive deep into one of the Vavr’s monadic tools for exception handling – Try.
>> Guide to Either
Either is a tool that enables us to represent values that can be one of two different types. Either can be used for exception handling or simply for business logic that diverges in certain scenarios.
>> Introduction to Pattern Matching
Pattern Matching is a tool present in almost all functional programming languages. It’s a highly advanced form of a classical switch-case.
>> Introduction to Validation API
We can ease validating our objects by leveraging applicative functors and Validation API.
>> Handling Exceptions in Lambda Expressions
We can also use Vavr’s tools for dealing with an aching problem of checked exceptions in lambda expressions.
>> Property Testing
Property Testing is an approach that allows us to specify the high-level behavior of a program and not bother with creating individual test cases manually.
>> Spring Data Support of Vavr’s Tools
Additionally, Vavr’s tools are now supported by Spring Data.