org.objectweb.telosys.common.vo
Class FieldComparer

java.lang.Object
  extended byorg.objectweb.telosys.common.vo.FieldComparer
All Implemented Interfaces:
java.util.Comparator

public class FieldComparer
extends java.lang.Object
implements java.util.Comparator

Standard bean field comparer ( Comparator implementation )


Field Summary
static boolean ASC
           
static boolean DESC
           
static boolean DO_NOT_IGNORE_CASE
           
static boolean IGNORE_CASE
           
 
Constructor Summary
FieldComparer(java.lang.String sFieldName, boolean bDescendingOrder, boolean bIgnoreCase)
          Constructor
 
Method Summary
 int compare(java.lang.Object obj1, java.lang.Object obj2)
           
 
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
 

Field Detail

IGNORE_CASE

public static final boolean IGNORE_CASE
See Also:
Constant Field Values

DO_NOT_IGNORE_CASE

public static final boolean DO_NOT_IGNORE_CASE
See Also:
Constant Field Values

DESC

public static final boolean DESC
See Also:
Constant Field Values

ASC

public static final boolean ASC
See Also:
Constant Field Values
Constructor Detail

FieldComparer

public FieldComparer(java.lang.String sFieldName,
                     boolean bDescendingOrder,
                     boolean bIgnoreCase)
Constructor

Parameters:
sFieldName - : the name of the field to compare
bDescendingOrder - : descending order if flag is true
bIgnoreCase - : ignore case flag ( used only to compare strings )
Method Detail

compare

public int compare(java.lang.Object obj1,
                   java.lang.Object obj2)
Specified by:
compare in interface java.util.Comparator