Package org.opensaml.security.credential.criteria.impl

# Class EvaluableKeyLengthCredentialCriterion

java.lang.Object
net.shibboleth.shared.logic.AbstractTriStatePredicate<Credential>
org.opensaml.security.credential.criteria.impl.EvaluableKeyLengthCredentialCriterion

All Implemented Interfaces:
  `Predicate<Credential>`, `Criterion`, `EvaluableCredentialCriterion`

public class EvaluableKeyLengthCredentialCriterion extends AbstractTriStatePredicate<Credential> implements EvaluableCredentialCriterion
Instance of evaluable credential criteria for evaluating the credential key length.

## Field Summary

Fields
Modifier and Type
Field
Description
`private final int`
`keyLength`
Base criteria.
`private final org.slf4j.Logger`
`log`
Logger.

## Constructor Summary

Constructors
Constructor
Description
`EvaluableKeyLengthCredentialCriterion(int newKeyLength)`
Constructor.
`EvaluableKeyLengthCredentialCriterion(KeyLengthCriterion criteria)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`boolean`
`equals(Object obj)`
`private Key`
`getKey(Credential credential)`
Get the key contained within the credential.
`int`
`hashCode()`
`boolean`
`test(Credential target)`
`String`
`toString()`

### Methods inherited from class net.shibboleth.shared.logic.AbstractTriStatePredicate

`isNullInputSatisfies, isUnevaluableSatisfies, setNullInputSatisfies, setUnevaluableSatisfies`

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

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

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

`and, negate, or`

## Field Details

### log

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

### keyLength

private final int keyLength
Base criteria.

## Constructor Details

### EvaluableKeyLengthCredentialCriterion

public EvaluableKeyLengthCredentialCriterion(@Nonnull KeyLengthCriterion criteria)
Constructor.

Parameters:
  `criteria` - the criteria which is the basis for evaluation

### EvaluableKeyLengthCredentialCriterion

public EvaluableKeyLengthCredentialCriterion(int newKeyLength)
Constructor.

Parameters:
  `newKeyLength` - the criteria value which is the basis for evaluation

## Method Details

### test

public boolean test(@Nullable Credential target)

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

### getKey

@Nullable private Key getKey(@Nonnull Credential credential)
Get the key contained within the credential.

Parameters:
  `credential` - the credential containing a key
Returns:
  the key from the credential

### toString

public String toString()

Overrides:
  `toString` in class `Object`

### hashCode

public int hashCode()

Overrides:
  `hashCode` in class `Object`

### equals

public boolean equals(Object obj)

Overrides:
  `equals` in class `Object`