Package org.opensaml.security.criteria

# Class UsageCriterion

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

All Implemented Interfaces:
  `Criterion`

public final class UsageCriterion extends Object implements Criterion
An implementation of `Criterion` which specifies criteria pertaining usage of the resolved credential.

## Field Summary

Fields
Modifier and Type
Field
Description
`private UsageType`
`credUsage`
Key usage type of resolved credentials.

## Constructor Summary

Constructors
Constructor
Description
`UsageCriterion(UsageType usage)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`boolean`
`equals(Object obj)`
`UsageType`
`getUsage()`
Get the key usage criteria.
`int`
`hashCode()`
`void`
`setUsage(UsageType usage)`
Set the key usage criteria.
`String`
`toString()`

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

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

## Field Details

### credUsage

@Nonnull private UsageType credUsage
Key usage type of resolved credentials.

## Constructor Details

### UsageCriterion

public UsageCriterion(@Nullable UsageType usage)
Constructor.

Parameters:
  `usage` - the usage for which a credential is intended

## Method Details

### getUsage

@Nonnull public UsageType getUsage()
Get the key usage criteria.

Returns:
  Returns the usage.

### setUsage

public void setUsage(@Nullable UsageType usage)
Set the key usage criteria.

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