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

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

public class ListOrderComparator<T>
extends java.lang.Object
implements java.util.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(java.util.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(java.util.List<T> list)
Method Detail

compare

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


Copyright © 2002-2010 Atlassian. All Rights Reserved.