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.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BasicStorable.IdComparator
public BasicStorable.IdComparator()
compare
public int compare(T s1,
T s2)
- Specified by:
compare
in interface Comparator<T extends Storable>
compareStorableId
public static int compareStorableId(Storable s1,
Storable s2)
- 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
Copyright © 2001-2010 Jalios SA. All Rights Reserved.