org.dasein.util
Class GenericSorter<T>

java.lang.Object
  extended by org.dasein.util.GenericSorter<T>
All Implemented Interfaces:
Comparator<T>

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


Constructor Summary
GenericSorter(String crit)
           
GenericSorter(String crit, Locale loc)
           
GenericSorter(String crit, Locale loc, boolean desc)
           
 
Method Summary
 int compare(T one, T two)
           
 String[] getCriteria()
           
 Locale getLocale()
           
 Object getValue(Object ob)
           
 boolean isDescending()
           
 boolean represents(String crit, Locale loc, boolean desc)
           
 void setCriteria(String crit)
           
 void setDescending(boolean desc)
           
 void setLocale(Locale loc)
           
 int sort(Object a1, Object a2)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Constructor Detail

GenericSorter

public GenericSorter(String crit)

GenericSorter

public GenericSorter(String crit,
                     Locale loc)

GenericSorter

public GenericSorter(String crit,
                     Locale loc,
                     boolean desc)
Method Detail

compare

public int compare(T one,
                   T two)
Specified by:
compare in interface Comparator<T>

getCriteria

public String[] getCriteria()

getLocale

public Locale getLocale()

getValue

public Object getValue(Object ob)

isDescending

public boolean isDescending()

represents

public boolean represents(String crit,
                          Locale loc,
                          boolean desc)

setCriteria

public void setCriteria(String crit)

setDescending

public void setDescending(boolean desc)

setLocale

public void setLocale(Locale loc)

sort

public int sort(Object a1,
                Object a2)

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2011 enStratus Networks LLC. All Rights Reserved.