<commit_before># <img align="left" src="durian.png"> Durian: [Guava](https://github.com/google/guava)'s spikier (unofficial) cousin

[![JCenter artifact](https://img.shields.io/badge/jcenter-com.diffplug.durian%3Adurian-blue.svg)](https://bintray.com/diffplug/opensource/durian/view)
[![Branch master](http://img.shields.io/badge/master-1.0-lightgrey.svg)](https://github.com/diffplug/durian/releases/latest)
[![Branch develop](http://img.shields.io/badge/develop-1.1--SNAPSHOT-lightgrey.svg)](https://github.com/diffplug/durian/tree/develop)
[![Branch develop Travis CI](https://travis-ci.org/diffplug/durian.svg?branch=develop)](https://travis-ci.org/diffplug/durian)
[![License](https://img.shields.io/badge/license-Apache-blue.svg)](https://tldrlegal.com/license/apache-license-2.0-(apache-2.0))

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](test/com/diffplug/common/base/ErrorHandlerExample.java) for Java 8 functional interfaces (even with checked exceptions).
* A [simple replacement](src/com/diffplug/common/base/StringPrinter.java) 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>>`](src/com/diffplug/common/base/TreeDef.java), create a `Stream` for [traversing](test/com/diffplug/common/base/TreeStreamTest.java) this tree (breadth-first, depth-first, etc.).
* An [enum for handling comparisons](src/com/diffplug/common/base/StringPrinter.java) in a pattern-matchey way.
* Guava's [`Suppliers`](src/com/diffplug/common/base/Suppliers.java), [`Predicates`](src/com/diffplug/common/base/Predicates.java), and [`Functions`](src/com/diffplug/common/base/Functions.java) converted to Java 8, and a new [`Consumers`](src/com/diffplug/common/base/Consumers.java) class to round it out.
* A few other carefully-curated Java 8 goodies:
	+ [Box and Box.NonNull](src/com/diffplug/common/base/Box.java)
	+ [GetterSetter](src/com/diffplug/common/base/GetterSetter.java)
	+ [MoreCollectors](src/com/diffplug/common/base/MoreCollectors.java)

Durian's only requirement is Java 8 or greater, no other libraries are needed (not even Guava).

Contributions are welcome, see [the contributing guide](CONTRIBUTING.md) for development info.

## Acknowledgements

* The API and tests for `Suppliers`, `Functions`, and `Predicates` were all ripped verbatim from [Guava](https://github.com/google/guava).
* `StringPrinter.toOutputStream()` borrows heavily from `WriterOutputStream`, inside Apache commons-io.
* `DurianPlugins` is inspired by RxJava's plugin mechanism.
* Formatted by [spotless](https://github.com/diffplug/spotless).
* Bugs found by [findbugs](http://findbugs.sourceforge.net/).
* Built by [gradle](http://gradle.org/).
* Tested by [junit](http://junit.org/).
* Artifacts hosted by [jcenter](https://bintray.com/bintray/jcenter) and uploaded by [gradle-bintray-plugin](https://github.com/bintray/gradle-bintray-plugin).
* Maintained by [DiffPlug](http://www.diffplug.com/).<commit_msg>A link that was supposed to be to Comparison was accidentally point to StringPrinter.  Also added links to the buildscript to point out plugin settings.<commit_after># <img align="left" src="durian.png"> Durian: [Guava](https://github.com/google/guava)'s spikier (unofficial) cousin

[![JCenter artifact](https://img.shields.io/badge/jcenter-com.diffplug.durian%3Adurian-blue.svg)](https://bintray.com/diffplug/opensource/durian/view)
[![Branch master](http://img.shields.io/badge/master-1.0-lightgrey.svg)](https://github.com/diffplug/durian/releases/latest)
[![Branch develop](http://img.shields.io/badge/develop-1.1--SNAPSHOT-lightgrey.svg)](https://github.com/diffplug/durian/tree/develop)
[![Branch develop Travis CI](https://travis-ci.org/diffplug/durian.svg?branch=develop)](https://travis-ci.org/diffplug/durian)
[![License](https://img.shields.io/badge/license-Apache-blue.svg)](https://tldrlegal.com/license/apache-license-2.0-(apache-2.0))

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](test/com/diffplug/common/base/ErrorHandlerExample.java) for Java 8 functional interfaces (even with checked exceptions).
* A [simple replacement](src/com/diffplug/common/base/StringPrinter.java) 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>>`](src/com/diffplug/common/base/TreeDef.java), create a `Stream` for [traversing](test/com/diffplug/common/base/TreeStreamTest.java) this tree (breadth-first, depth-first, etc.).
* An [enum for handling comparisons](src/com/diffplug/common/base/Comparison.java) in a pattern-matchey way.
* Guava's [`Suppliers`](src/com/diffplug/common/base/Suppliers.java), [`Predicates`](src/com/diffplug/common/base/Predicates.java), and [`Functions`](src/com/diffplug/common/base/Functions.java) converted to Java 8, and a new [`Consumers`](src/com/diffplug/common/base/Consumers.java) class to round it out.
* A few other carefully-curated Java 8 goodies:
	+ [Box and Box.NonNull](src/com/diffplug/common/base/Box.java)
	+ [GetterSetter](src/com/diffplug/common/base/GetterSetter.java)
	+ [MoreCollectors](src/com/diffplug/common/base/MoreCollectors.java)

Durian's only requirement is Java 8 or greater, no other libraries are needed (not even Guava).

Contributions are welcome, see [the contributing guide](CONTRIBUTING.md) for development info.

## Acknowledgements

* The API and tests for `Suppliers`, `Functions`, and `Predicates` were all ripped verbatim from [Guava](https://github.com/google/guava).
* `StringPrinter.toOutputStream()` borrows heavily from `WriterOutputStream`, inside Apache commons-io.
* `DurianPlugins` is inspired by RxJava's plugin mechanism.
* Formatted by [spotless](https://github.com/diffplug/spotless)
	+ [build.gradle](https://github.com/diffplug/durian/blob/develop/build.gradle#L70-90)
* Bugs found by [findbugs](http://findbugs.sourceforge.net/)
	+ [build.gradle](https://github.com/diffplug/durian/blob/develop/build.gradle#L101-102)
* Built by [gradle](http://gradle.org/).
* Tested by [junit](http://junit.org/).
* Artifacts hosted by [jcenter](https://bintray.com/bintray/jcenter) and uploaded by [gradle-bintray-plugin](https://github.com/bintray/gradle-bintray-plugin).
* Maintained by [DiffPlug](http://www.diffplug.com/).
{'fraction_non_alphanumeric': 0.1511662237968704, 'fraction_numerical': 0.005314437555358724, 'mean_word_length': 5.514423076923077, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 28, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '35186', 'n_tokens_mistral': 2270, 'n_tokens_neox': 2174, 'n_words': 481}