Package net.shibboleth.idp.authn.principal.impl

# Class ExactPrincipalEvalPredicateFactory.ExactMatchPredicate

java.lang.Object
net.shibboleth.idp.authn.principal.impl.ExactPrincipalEvalPredicateFactory.ExactMatchPredicate

All Implemented Interfaces:
  `Predicate<PrincipalSupportingComponent>`, `PrincipalEvalPredicate`

Enclosing class:
  ExactPrincipalEvalPredicateFactory

private class ExactPrincipalEvalPredicateFactory.ExactMatchPredicate extends Object implements PrincipalEvalPredicate
Implementation of an exact-matching predicate.

## Field Summary

Fields
Modifier and Type
Field
Description
`private final Principal`
`principal`
The principal object to compare against.

## Constructor Summary

Constructors
Constructor
Description
`ExactMatchPredicate(Principal candidate)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`Principal`
`getMatchingPrincipal()`
Get the `Principal` object from the evaluated `PrincipalSupportingComponent` that actually satisfied the predicate, if any.
`boolean`
`test(PrincipalSupportingComponent input)`

### 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

### principal

@Nonnull private final Principal principal
The principal object to compare against.

## Constructor Details

### ExactMatchPredicate

public ExactMatchPredicate(@Nonnull Principal candidate)
Constructor.

Parameters:
  `candidate` - principal to compare against

## Method Details

### test

public boolean test(@Nullable PrincipalSupportingComponent input)

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

### getMatchingPrincipal

@Nullable public Principal getMatchingPrincipal()
Get the `Principal` object from the evaluated `PrincipalSupportingComponent` that actually satisfied the predicate, if any.

Specified by:
  `getMatchingPrincipal` in interface `PrincipalEvalPredicate`
Returns:
  a custom principal, or null