Package org.opensaml.xmlsec.criterion

# Class EncryptionOptionalCriterion

java.lang.Object
org.opensaml.xmlsec.criterion.EncryptionOptionalCriterion

All Implemented Interfaces:
  `Criterion`

public class EncryptionOptionalCriterion extends Object implements Criterion
A criterion for specifying whether encryption is to be treated as optional.

Since:
  3.3.0

## Field Summary

Fields
Modifier and Type
Field
Description
`private boolean`
`encryptionOptional`
The encryptionOptional criterion value.

## Constructor Summary

Constructors
Constructor
Description
`EncryptionOptionalCriterion()`
Constructor.
`EncryptionOptionalCriterion(boolean value)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`boolean`
`equals(Object other)`
`int`
`hashCode()`
`boolean`
`isEncryptionOptional()`
Get the encryptionOptional value.
`String`
`toString()`

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

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

## Field Details

### encryptionOptional

private boolean encryptionOptional
The encryptionOptional criterion value.

## Constructor Details

### EncryptionOptionalCriterion

public EncryptionOptionalCriterion()
Constructor.

### EncryptionOptionalCriterion

public EncryptionOptionalCriterion(boolean value)
Constructor.

Parameters:
  `value` - the encryptionOptional flag value

## Method Details

### isEncryptionOptional

public boolean isEncryptionOptional()
Get the encryptionOptional value.

Returns:
  true or false

### hashCode

public int hashCode()

Overrides:
  `hashCode` in class `Object`

### equals

public boolean equals(Object other)

Overrides:
  `equals` in class `Object`

### toString

public String toString()

Overrides:
  `toString` in class `Object`