com.jalios.jstore
Class BasicStorable.IdComparator<T extends Storable>

java.lang.Object
  extended by com.jalios.jstore.BasicStorable.IdComparator<T>
Type Parameters:
T - subclasse of Storable
All Implemented Interfaces:
Comparator<T>
Direct Known Subclasses:
Data.DataNameComparator
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
BasicStorable.IdComparator()
           
 
Method Summary
 int compare(T s1, T s2)
           
static int compareStorableId(Storable s1, Storable s2)
          Compare two storable using their ID.
 
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
 

Constructor Detail

BasicStorable.IdComparator

public BasicStorable.IdComparator()
Method Detail

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 compare
s2 - the second storable to compare
Returns:
a int to compare this two storables


Copyright © 2001-2007 Jalios SA. All Rights Reserved.