Durian: Guava's spikier (unofficial) cousin
NOT YET SUITABLE FOR USE - we're releasing a formerly internal library, bear with us as we clean it up for public release
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.
- A simple replacement for the mess of
PrintStream
,OutputStream
,Writer
, etc. when all you want is to pipe some strings around. - TODO: 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.
- TODO: Guava's functional interface utilities (
Suppliers
,Predicates
, etc.) converted to Java 8.
Durian's only requirement is Java 8 or greater, no other libraries needed (not even Guava). It is published to JCenter at the maven coordinates com.diffplug.durian:durian
.
- The
MANIFEST.MF
has a bunch of unneededVER_suchandsuch
properties. They don't do any harm, but it would be nice to fix. Github issue gradlew format
is supposed to format the source code. For now, it doesn't work. Github issue
- Built by gradle.
- Tested by junit.
- Bugs found by findbugs.
- Bundled for OSGI by gradle-bundle-plugin.
- Formatted by gradle-format-plugin.
- License headered by license-gradle-plugin.
- Artifacts hosted by jcenter and uploaded by gradle-bintray-plugin.
StringPrinter.toOutputStream()
borrows heavily fromWriterOutputStream
, inside Apache commons-io.DurianPlugins
is inspired by RxJava's plugin mechanism.