org.squashtest.tm.domain
Class IdentifiersOrderComparator

java.lang.Object
  extended by org.squashtest.tm.domain.IdentifiersOrderComparator
All Implemented Interfaces:
Comparator<Identified>

public class IdentifiersOrderComparator
extends Object
implements Comparator<Identified>

This class compares Identified objects. It uses an ordered collection (ie a list) of ids. The order of 2 Identified objects is the order of their ids in this list.

Author:
Gregory Fouquet

Constructor Summary
IdentifiersOrderComparator(List<Long> orderedIds)
           
 
Method Summary
 int compare(Identified o1, Identified o2)
           
 
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

IdentifiersOrderComparator

public IdentifiersOrderComparator(@NotNull
                                  List<Long> orderedIds)
Parameters:
orderedIds -
Method Detail

compare

public int compare(Identified o1,
                   Identified o2)
Specified by:
compare in interface Comparator<Identified>
See Also:
Comparator.compare(java.lang.Object, java.lang.Object)


Copyright © 2010-2013 Henix, henix.fr. All Rights Reserved.