Class SignatureValidityComparator
- java.lang.Object
-
- org.pgpainless.signature.consumer.SignatureValidityComparator
-
- All Implemented Interfaces:
java.util.Comparator<org.bouncycastle.openpgp.PGPSignature>
public class SignatureValidityComparator extends java.lang.Object implements java.util.Comparator<org.bouncycastle.openpgp.PGPSignature>
Comparator which sorts signatures based on an ordering and on revocation hardness. If a list of signatures gets ordered using this comparator, hard revocations will always come first. Further, signatures are ordered by date according to theSignatureCreationDateComparator.Order
.
-
-
Constructor Summary
Constructors Constructor Description SignatureValidityComparator()
Create a newSignatureValidityComparator
which orders signatures the oldest first.SignatureValidityComparator(SignatureCreationDateComparator.Order order)
Create a newSignatureValidityComparator
which orders signatures following the passed ordering.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(org.bouncycastle.openpgp.PGPSignature one, org.bouncycastle.openpgp.PGPSignature two)
-
-
-
Constructor Detail
-
SignatureValidityComparator
public SignatureValidityComparator()
Create a newSignatureValidityComparator
which orders signatures the oldest first. Still, hard revocations will come first.
-
SignatureValidityComparator
public SignatureValidityComparator(SignatureCreationDateComparator.Order order)
Create a newSignatureValidityComparator
which orders signatures following the passed ordering. Still, hard revocations will come first.- Parameters:
order
- order of creation dates
-
-