Package eu.europa.esig.dss.cades
Class TimeStampTokenProductionComparator
java.lang.Object
eu.europa.esig.dss.cades.TimeStampTokenProductionComparator
- All Implemented Interfaces:
Serializable,Comparator<org.bouncycastle.tsp.TimeStampToken>
public class TimeStampTokenProductionComparator
extends Object
implements Comparator<org.bouncycastle.tsp.TimeStampToken>, Serializable
The class used to compare production time of
TimeStampTokens
Class checks the production time of timestamps and their covered data
The method compare() returns
-1 if the timeStampTokenOne was created before timeStampTokenTwo
0 if TimeStampTokens were created in the same
1 if the timeStampTokenOne was created after timeStampTokenTwo- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanafter(org.bouncycastle.tsp.TimeStampToken timeStampTokenOne, org.bouncycastle.tsp.TimeStampToken timeStampTokenTwo) Returns TRUE iftimeStampTokenOnewas created aftertimeStampTokenTwointcompare(org.bouncycastle.tsp.TimeStampToken timeStampTokenOne, org.bouncycastle.tsp.TimeStampToken timeStampTokenTwo) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
TimeStampTokenProductionComparator
public TimeStampTokenProductionComparator()Default constructor
-
-
Method Details
-
compare
public int compare(org.bouncycastle.tsp.TimeStampToken timeStampTokenOne, org.bouncycastle.tsp.TimeStampToken timeStampTokenTwo) - Specified by:
comparein interfaceComparator<org.bouncycastle.tsp.TimeStampToken>
-
after
public boolean after(org.bouncycastle.tsp.TimeStampToken timeStampTokenOne, org.bouncycastle.tsp.TimeStampToken timeStampTokenTwo) Returns TRUE iftimeStampTokenOnewas created aftertimeStampTokenTwo- Parameters:
timeStampTokenOne-TimeStampTokentimeStampTokenTwo-TimeStampToken- Returns:
- TRUE if the first
TimeStampTokenhas been created after the second timestamp, FALSE otherwise
-