Durian: Guava's spikier (unofficial) cousin
Guava has become indispensable for many Java developers. Because of its wide adoption, it must be conservative regarding its minimum requirements.
Durian complements Guava with some features which are too spiky for Guava, such as:
- One-liner exception handling for Java 8 functional interfaces (even with checked exceptions).
- A simple replacement for the mess of
Writer, etc. when all you want is to pipe some strings around.
- Given a node in a tree, and a
Function<Node, List<Node>>, create a
Streamfor traversing this tree (breadth-first, depth-first, etc.).
- An enum for handling comparisons in a pattern-matchey way.
Functionsconverted to Java 8, and a new
Consumersclass to round it out.
- A few other carefully-curated Java 8 goodies:
Durian's only requirement is Java 8 or greater, no other libraries are needed (not even Guava).
Contributions are welcome, see the contributing guide for development info.
If you have a
Box, but you'd like to subscribe to changes in its value, you should look at
RxBox in DurianRx.
- The API and tests for
Predicatesare all verbatim from Guava.
StringPrinter.toOutputStream()borrows heavily from
WriterOutputStream, inside Apache commons-io.
DurianPluginsis inspired by RxJava's plugin mechanism.
- Formatted by spotless, as such.
- Bugs found by findbugs, as such.
- OSGi metadata generated by goomph, which leverages Peter Kriens' bnd.
- Scripts in the
.cifolder are inspired by Ben Limmer's work.
- Built by gradle.
- Tested by junit.
- Maintained by DiffPlug.