Package org.pgpainless.signature.consumer

# Class SignatureCreationDateComparator

java.lang.Object
org.pgpainless.signature.consumer.SignatureCreationDateComparator

All Implemented Interfaces:
  `Comparator<org.bouncycastle.openpgp.PGPSignature>`

public class SignatureCreationDateComparator extends Object implements Comparator<org.bouncycastle.openpgp.PGPSignature>
Comparator which can be used to sort signatures with regard to their creation time.

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static enum`
`SignatureCreationDateComparator.Order`

## Field Summary

Fields
Modifier and Type
Field
Description
`static final SignatureCreationDateComparator.Order`
`DEFAULT_ORDER`

## Constructor Summary

Constructors
Constructor
Description
`SignatureCreationDateComparator()`
Create a new comparator which sorts signatures old to new.
`SignatureCreationDateComparator(SignatureCreationDateComparator.Order order)`
Create a new comparator which sorts signatures according to the passed ordering.

## Method Summary

Modifier and Type
Method
Description
`int`
`compare(org.bouncycastle.openpgp.PGPSignature one, org.bouncycastle.openpgp.PGPSignature two)`

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

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface java.util.Comparator

`equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong`

## Field Details

### DEFAULT_ORDER

public static final SignatureCreationDateComparator.Order DEFAULT_ORDER

## Constructor Details

### SignatureCreationDateComparator

public SignatureCreationDateComparator()
Create a new comparator which sorts signatures old to new.

### SignatureCreationDateComparator

public SignatureCreationDateComparator(SignatureCreationDateComparator.Order order)
Create a new comparator which sorts signatures according to the passed ordering.

Parameters:
  `order` - ordering

## Method Details

### compare

public int compare(org.bouncycastle.openpgp.PGPSignature one, org.bouncycastle.openpgp.PGPSignature two)

Specified by:
  `compare` in interface `Comparator<org.bouncycastle.openpgp.PGPSignature>`