Package org.opensaml.security.criteria

# Class KeyAlgorithmCriterion

java.lang.Object
org.opensaml.security.criteria.KeyAlgorithmCriterion

All Implemented Interfaces:
  `Criterion`

public final class KeyAlgorithmCriterion extends Object implements Criterion
An implementation of `Criterion` which specifies key algorithm criteria.

## Field Summary

Fields
Modifier and Type
Field
Description
`private String`
`keyAlgorithm`
Key algorithm type of resolved credentials.

## Constructor Summary

Constructors
Constructor
Description
`KeyAlgorithmCriterion(String algorithm)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`boolean`
`equals(Object obj)`
`String`
`getKeyAlgorithm()`
Get the key algorithm criteria.
`int`
`hashCode()`
`void`
`setKeyAlgorithm(String algorithm)`
Set the key algorithm criteria.
`String`
`toString()`
`private static String`
`validateAlgorithm(String algorithm)`
Static method to validate and return null algorithm.

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

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

## Field Details

### keyAlgorithm

@Nonnull private String keyAlgorithm
Key algorithm type of resolved credentials.

## Constructor Details

### KeyAlgorithmCriterion

public KeyAlgorithmCriterion(@Nonnull @NotEmpty String algorithm)
Constructor.

Parameters:
  `algorithm` - key algorithm

## Method Details

### getKeyAlgorithm

@Nonnull @NotEmpty public String getKeyAlgorithm()
Get the key algorithm criteria.

Returns:
  returns the keyAlgorithm.

### setKeyAlgorithm

public void setKeyAlgorithm(@Nonnull String algorithm)
Set the key algorithm criteria.

Parameters:
  `algorithm` - The keyAlgorithm to set.

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

### validateAlgorithm

@Nonnull @NotEmpty private static String validateAlgorithm(@Nonnull String algorithm)
Static method to validate and return null algorithm.

Parameters:
  `algorithm` - candidate
Returns:
  the input parameter if not null/empty after trimming