org.mentawai.tag.util
Class ListSorter

java.lang.Object
  extended by org.mentawai.tag.util.ListSorter
All Implemented Interfaces:
java.util.Comparator<java.lang.Object>

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


Constructor Summary
ListSorter(java.lang.String campo)
           
 
Method Summary
 int compare(java.lang.Object primeiro, java.lang.Object segundo)
           
static java.util.List<java.lang.Object> sort(java.util.List<java.lang.Object> lista, java.lang.String campo, boolean reverse)
          Metodo responsavel por retorna uma lista de Object ordenada pelo nome do campo informado
 
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

ListSorter

public ListSorter(java.lang.String campo)
Method Detail

compare

public int compare(java.lang.Object primeiro,
                   java.lang.Object segundo)
Specified by:
compare in interface java.util.Comparator<java.lang.Object>

sort

public static java.util.List<java.lang.Object> sort(java.util.List<java.lang.Object> lista,
                                                    java.lang.String campo,
                                                    boolean reverse)
Metodo responsavel por retorna uma lista de Object ordenada pelo nome do campo informado

Parameters:
lista -
campo -
reverse -
Returns:
list sorted


Copyright © 2005 Mentawai Team. All Rights Reserved.