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
PrintStream
,OutputStream
,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 aStream
for traversing this tree (breadth-first, depth-first, etc.). - An enum for handling comparisons in a pattern-matchey way.
- Guava's
Suppliers
,Predicates
, andFunctions
converted to Java 8, and a newConsumers
class 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
Suppliers
,Functions
, andPredicates
are all verbatim from Guava. StringPrinter.toOutputStream()
borrows heavily fromWriterOutputStream
, inside Apache commons-io.DurianPlugins
is 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
.ci
folder are inspired by Ben Limmer's work. - Built by gradle.
- Tested by junit.
- Maintained by DiffPlug.