<commit_before># java-8-matchers

[![Build Status](https://travis-ci.org/unruly/java-8-matchers.svg?branch=master)](https://travis-ci.org/unruly/java-8-matchers)
[![Release Version](https://img.shields.io/maven-central/v/co.unruly/java-8-matchers.svg)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22co.unruly%22%20AND%20a%3A%22java-8-matchers%22)

Hamcrest Matchers for Java 8 features.

Contains matchers for:

* java.util.Optional (and primitive variants)
* java.util.Stream (and primitive variants)
* java.time.Temporal (Instant, LocalDateTime, various other calendar systems)
* java.time.TemporalAmount (Duration and Period)


## Installation

Available from the Central Repository. In Maven style:

```xml
<dependency>
  <groupId>co.unruly</groupId>
  <artifactId>java-8-matchers</artifactId>
  <version>1.5</version>
</dependency>
```

A test-jar is also available to gain access to a helper for testing the error messages of failing
Matchers.

```xml
<type>test-jar</type><commit_msg>Update version to 1.6 in xml for Maven dependency<commit_after># java-8-matchers

[![Build Status](https://travis-ci.org/unruly/java-8-matchers.svg?branch=master)](https://travis-ci.org/unruly/java-8-matchers)
[![Release Version](https://img.shields.io/maven-central/v/co.unruly/java-8-matchers.svg)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22co.unruly%22%20AND%20a%3A%22java-8-matchers%22)

Hamcrest Matchers for Java 8 features.

Contains matchers for:

* java.util.Optional (and primitive variants)
* java.util.Stream (and primitive variants)
* java.time.Temporal (Instant, LocalDateTime, various other calendar systems)
* java.time.TemporalAmount (Duration and Period)


## Installation

Available from the Central Repository. In Maven style:

```xml
<dependency>
  <groupId>co.unruly</groupId>
  <artifactId>java-8-matchers</artifactId>
  <version>1.6</version>
</dependency>
```

A test-jar is also available to gain access to a helper for testing the error messages of failing
Matchers.

```xml
<type>test-jar</type>
{'fraction_non_alphanumeric': 0.14729064039408868, 'fraction_numerical': 0.027586206896551724, 'mean_word_length': 5.427215189873418, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 5}, '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': '996326', 'n_tokens_mistral': 766, 'n_tokens_neox': 698, 'n_words': 147}