markhobson / hamcrest-compose

Hamcrest matchers for composition.
Apache License 2.0
30 stars 6 forks source link

Provide compose factory method that accepts a list of matchers #3

Closed markhobson closed 9 years ago

markhobson commented 9 years ago

When building composite matchers programmatically the fluent style can be awkward to work with. For example, composing a list of matchers requires compose() to be invoked for the first one and then and() for the subsequent ones. For this use case we should provide a compose(List<Matcher<T>> matchers) factory method.