Package net.sf.eBus.feed.historic
Class EHistoricSubscribeFeed.PastComparator
- java.lang.Object
-
- net.sf.eBus.feed.historic.EHistoricSubscribeFeed.PastComparator
-
- All Implemented Interfaces:
Comparator<ENotificationMessage>
- Enclosing class:
- EHistoricSubscribeFeed
public static final class EHistoricSubscribeFeed.PastComparator extends Object implements Comparator<ENotificationMessage>
Comparator used to sort historic notification messages by timestamp, publisher identifier, and message position.
-
-
Constructor Summary
Constructors Constructor Description PastComparator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompare(ENotificationMessage o1, ENotificationMessage o2)Compares two eBus notification messages for order.-
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(ENotificationMessage o1, ENotificationMessage o2)
Compares two eBus notification messages for order. Returns an integer values <, equal to, or > zero if the first argument is <, equal to, or > the second argument. Comparison is based on the following notification properties:- message timestamp,
- publisher identifier, and
- message position.
- Specified by:
comparein interfaceComparator<ENotificationMessage>- Parameters:
o1- first notification message to be compared.o2- second notification message to be compared.- Returns:
- an integer value <, equal to, or > zero if first argument is <, equal to, or > second argument.
-
-