com.atlassian.jira.util.collect
Class ListOrderComparator<T>

java.lang.Object
  extended by com.atlassian.jira.util.collect.ListOrderComparator<T>
All Implemented Interfaces:
Comparator<T>

public class ListOrderComparator<T>
extends Object
implements Comparator<T>

Compare objects based on their order in a supplied list. Fails if the compared objects are not in the source list.

Since:
v3.13

Constructor Summary
ListOrderComparator(List<T> list)
           
 
Method Summary
 int compare(T o1, T 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

ListOrderComparator

public ListOrderComparator(List<T> list)
Method Detail

compare

public int compare(T o1,
                   T o2)
Specified by:
compare in interface Comparator<T>


Copyright © 2002-2011 Atlassian. All Rights Reserved.