Class TimeStampTokenProductionComparator
- java.lang.Object
-
- eu.europa.esig.dss.validation.timestamp.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 ofTimeStampTokens Class checks the production time of timestamps and their covered data The method compare() returns -1 if thetimeStampTokenOnewas created beforetimeStampTokenTwo0 if TimeStampTokens were created in the same 1 if thetimeStampTokenOnewas created aftertimeStampTokenTwo- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description TimeStampTokenProductionComparator()
-
Method Summary
Modifier and Type Method Description booleanafter(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, wait
-
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
-
-
-
Method Detail
-
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
-
-