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

# Class EntityAttributesPredicate.EntityAttributesMatcher

java.lang.Object
org.opensaml.saml.common.profile.logic.EntityAttributesPredicate.EntityAttributesMatcher

All Implemented Interfaces:
  `Predicate<EntityAttributesPredicate.Candidate>`

Enclosing class:
  EntityAttributesPredicate

private class EntityAttributesPredicate.EntityAttributesMatcher extends Object implements Predicate<EntityAttributesPredicate.Candidate>
Determines whether an `EntityAttributesPredicate.Candidate` criterion is satisfied by the `Attribute`s in an `EntityAttributes` extension.

## Field Summary

Fields
Modifier and Type
Field
Description
`private final Collection<Attribute>`
`attributes`
Population to evaluate for a match.

## Constructor Summary

Constructors
Constructor
Description
`EntityAttributesMatcher(Collection<Attribute> attrs)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`private List<String>`
`getPossibleAttributeValuesAsStrings(Attribute attribute)`
Get all possible strings values for the attribute.
`boolean`
`test(EntityAttributesPredicate.Candidate input)`
`private List<String>`
`xmlObjectToStrings(XMLObject object)`
Convert an XMLObject to an array of String which can represent the type, if recognized.

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

### attributes

@Nonnull private final Collection<Attribute> attributes
Population to evaluate for a match.

## Constructor Details

### EntityAttributesMatcher

public EntityAttributesMatcher(@Nonnull Collection<Attribute> attrs)
Constructor.

Parameters:
  `attrs` - population to evaluate for a match

## Method Details

### test

public boolean test(@Nullable EntityAttributesPredicate.Candidate input)

Specified by:
  `test` in interface `Predicate<EntityAttributesPredicate.Candidate>`

### getPossibleAttributeValuesAsStrings

@Nonnull @Live private List<String> getPossibleAttributeValuesAsStrings(@Nonnull Attribute attribute)
Get all possible strings values for the attribute. This copes with the fact that an attribute can return multiple values `Attribute.getAttributeValues()` and that some type of value can have multiple values (for instance a boolean can be 1/0/true/false).

Parameters:
  `attribute` - what to inspect
Returns:
  all possible values, as string.

### xmlObjectToStrings

@Nullable @Unmodifiable @NotLive private List<String> xmlObjectToStrings(@Nonnull XMLObject object)
Convert an XMLObject to an array of String which can represent the type, if recognized.

Parameters:
  `object` - object to convert
Returns:
  the converted value, or null