Package org.opensaml.security.criteria

# Class KeyNameCriterion

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

All Implemented Interfaces:
  `Criterion`

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

## Field Summary

Fields
Modifier and Type
Field
Description
`private String`
`keyName`
Key name of resolved credentials.

## Constructor Summary

Constructors
Constructor
Description
`KeyNameCriterion(String name)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`boolean`
`equals(Object obj)`
`String`
`getKeyName()`
Get the key name criteria.
`int`
`hashCode()`
`void`
`setKeyName(String name)`
Set the key name criteria.
`String`
`toString()`
`String`
`validateKeyName(String name)`
Validate key name criterion.

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

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

## Field Details

### keyName

@Nonnull @NotEmpty private String keyName
Key name of resolved credentials.

## Constructor Details

### KeyNameCriterion

public KeyNameCriterion(@Nonnull @NotEmpty String name)
Constructor.

Parameters:
  `name` - key name

## Method Details

### getKeyName

@Nonnull @NotEmpty public String getKeyName()
Get the key name criteria.

Returns:
  Returns the keyName.

### setKeyName

public void setKeyName(@Nonnull @NotEmpty String name)
Set the key name criteria.

Parameters:
  `name` - The keyName 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`

### validateKeyName

@Nonnull @NotEmpty public String validateKeyName(@Nonnull @NotEmpty String name)
Validate key name criterion.

Parameters:
  `name` - name to check
Returns:
  the input if non-null/empty