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
TimeStampToken
s
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
-
Method Summary
Modifier and TypeMethodDescriptionboolean
after
(org.bouncycastle.tsp.TimeStampToken timeStampTokenOne, org.bouncycastle.tsp.TimeStampToken timeStampTokenTwo) Returns TRUE iftimeStampTokenOne
was created aftertimeStampTokenTwo
int
compare
(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, wait
Methods 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:
compare
in interfaceComparator<org.bouncycastle.tsp.TimeStampToken>
-
after
public boolean after(org.bouncycastle.tsp.TimeStampToken timeStampTokenOne, org.bouncycastle.tsp.TimeStampToken timeStampTokenTwo) Returns TRUE iftimeStampTokenOne
was created aftertimeStampTokenTwo
- Parameters:
timeStampTokenOne
-TimeStampToken
timeStampTokenTwo
-TimeStampToken
- Returns:
- TRUE if the first
TimeStampToken
has been created after the second timestamp, FALSE otherwise
-