Package net.shibboleth.shared.logic

# Class AllMatchPredicate<T>

java.lang.Object
net.shibboleth.shared.logic.AllMatchPredicate<T>

Type Parameters:
  `T` - type of object upon which this predicate operates

All Implemented Interfaces:
  `Predicate<Iterable<T>>`

public class AllMatchPredicate<T> extends Object implements Predicate<Iterable<T>>
A `Predicate` that checks that all items in an `Iterable` match a given target predicate. If the given `Iterable` is null or contains no items this method will return `false`, otherwise it passes each `Iterable` value to the target predicate, even if those values are `null`. The first `false` returned by the target predicate stops evaluation and causes this predicate to return (i.e., it short-circuits the evaluation).

## Field Summary

Fields
Modifier and Type
Field
Description
`private final Predicate<T>`
`predicate`
The predicate applied to each value of the `Iterable`.

## Constructor Summary

Constructors
Constructor
Description
`AllMatchPredicate(Predicate<T> target)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`boolean`
`test(Iterable<T> inputs)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface java.util.function.Predicate

`and, negate, or`

## Field Details

### predicate

@Nonnull private final Predicate<T> predicate
The predicate applied to each value of the `Iterable`.

## Constructor Details

### AllMatchPredicate

public AllMatchPredicate(@Nonnull Predicate<T> target)
Constructor.

Parameters:
  `target` - the target predicate against which all `Iterable` elements are evaluated

## Method Details

### test

public boolean test(@Nullable @NullableElements Iterable<T> inputs)

Specified by:
  `test` in interface `Predicate<T>`