Package org.opensaml.saml.common.profile.logic

# Class EntityGroupNamePredicate

java.lang.Object
org.opensaml.saml.common.profile.logic.EntityGroupNamePredicate

All Implemented Interfaces:
  `Predicate<EntityDescriptor>`

public class EntityGroupNamePredicate extends Object implements Predicate<EntityDescriptor>
Predicate to determine whether one of a set of names matches any of an entity's containing `EntitiesDescriptor` groups.

## Field Summary

Fields
Modifier and Type
Field
Description
`private Collection<CriteriaSet>`
`criteriaSets`
Pre-created criteria sets for metadata lookup.
`private final Set<String>`
`groupNames`
Groups to match on.
`private final org.slf4j.Logger`
`log`
Class logger.
`private MetadataResolver`
`metadataResolver`
A supplemental resolver to allow for `AffiliationDescriptor` lookup.

## Constructor Summary

Constructors
Constructor
Description
`EntityGroupNamePredicate(Collection<String> names)`
Constructor.
`EntityGroupNamePredicate(Collection<String> names, MetadataResolver resolver)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`Set<String>`
`getGroupNames()`
Get the group name criteria.
`boolean`
`test(EntityDescriptor 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

### log

@Nonnull private final org.slf4j.Logger log
Class logger.

### groupNames

@Nonnull private final Set<String> groupNames
Groups to match on.

### metadataResolver

@Nullable private MetadataResolver metadataResolver
A supplemental resolver to allow for `AffiliationDescriptor` lookup.

### criteriaSets

@Nullable private Collection<CriteriaSet> criteriaSets
Pre-created criteria sets for metadata lookup.

## Constructor Details

### EntityGroupNamePredicate

public EntityGroupNamePredicate(@Nullable @ParameterName(name="names") Collection<String> names)
Constructor.

Parameters:
  `names` - the group names to test for

### EntityGroupNamePredicate

public EntityGroupNamePredicate(@Nullable @ParameterName(name="names") Collection<String> names, @Nullable @ParameterName(name="resolver") MetadataResolver resolver)
Constructor.

Parameters:
  `names` - the group names to test for
  `resolver` - metadata resolver for affiliation support
Since:
  3.4.0

## Method Details

### getGroupNames

@Nonnull @Unmodifiable @NotLive public Set<String> getGroupNames()
Get the group name criteria.

Returns:
  the group name criteria

### test

public boolean test(@Nullable EntityDescriptor input)

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