public class LvgComparator<T>
extends java.lang.Object
implements java.util.Comparator<T>
History:
Constructor and Description |
---|
LvgComparator() |
Modifier and Type | Method and Description |
---|---|
int |
compare(T o1,
T o2)
Compare two objects by LVG order (length and insentitive ASCII).
|
void |
SetCase(boolean value)
Set the flag of comparing cases in this comparator.
|
void |
SetLengthFlag(boolean value)
Set the flag of comparing string length in this comparator.
|
public int compare(T o1, T o2)
compare
in interface java.util.Comparator<T>
o1
- the first object to be comparedo2
- the second object to be comparedpublic void SetLengthFlag(boolean value)
value
- true or false if compare length or not in the comparatorpublic void SetCase(boolean value)
value
- true or false if compare is or is not case sensitive