org.jboss.webbeans.util
Class ListComparator<T>

java.lang.Object
  extended by org.jboss.webbeans.util.ListComparator<T>
Type Parameters:
T -
All Implemented Interfaces:
java.util.Comparator<T>

public class ListComparator<T>
extends java.lang.Object
implements java.util.Comparator<T>

List comparator based on element location

Author:
Pete Muir

Constructor Summary
ListComparator(java.util.List<T> list)
          Constructor
 
Method Summary
 int compare(T o1, T o2)
          Compares the entries
 
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

ListComparator

public ListComparator(java.util.List<T> list)
Constructor

Parameters:
list - The source list
Method Detail

compare

public int compare(T o1,
                   T o2)
Compares the entries

Specified by:
compare in interface java.util.Comparator<T>


Copyright © 2011. All Rights Reserved.