Package com.jalios.jstore
Class BasicStorable.IdComparator<T extends Storable>
java.lang.Object
com.jalios.jstore.BasicStorable.IdComparator<T>
- Type Parameters:
T- subclasse of Storable
- All Implemented Interfaces:
Comparator<T>
- Enclosing class:
BasicStorable
public static class BasicStorable.IdComparator<T extends Storable>
extends Object
implements Comparator<T>
Compares two Storables using their ID.
Note: this comparator imposes orderings that are inconsistent with equals.
-
Constructor Summary
Constructors -
Method Summary
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
-
IdComparator
public IdComparator()
-
-
Method Details
-
compare
- Specified by:
comparein interfaceComparator<T extends Storable>
-
compareStorableId
Compare two storable using their ID.- Parameters:
s1- the first storable to compares2- the second storable to compare- Returns:
- a int to compare this two storables
-