public class LexItemComparator<T>
extends java.lang.Object
implements java.util.Comparator<T>
History:
| Modifier and Type | Field and Description |
|---|---|
static int |
ALPHABETIC |
static int |
LVG_RULE |
static int |
NONE
an enumerated type for setting the comparing rule by LVG principle
|
static int |
TERM |
static int |
TERM_CAT |
static int |
TERM_CAT_INFL |
| Constructor and Description |
|---|
LexItemComparator() |
| Modifier and Type | Method and Description |
|---|---|
int |
compare(T o1,
T o2)
To compare two object o1 and o2.
|
static int |
GetCategoryPriority(long category)
Get the priority of ordering for a category.
|
void |
SetCase(boolean caseFlag)
Set the .g for case sensitivity
|
void |
SetRule(int rule)
Set the comparing rule for this comparator.
|
public static final int NONE
public static final int TERM
public static final int TERM_CAT
public static final int TERM_CAT_INFL
public static final int LVG_RULE
public static final int ALPHABETIC
public int compare(T o1, T o2)
compare in interface java.util.Comparator<T>o1 - first object to be comparedo2 - second object to be comparedpublic void SetRule(int rule)
rule - an enumurated value. Such as Lvg.LexItemComparator.LVG_RULE
means to use lvg principle to compare object. Otherwise, use
compartor for combining records.public void SetCase(boolean caseFlag)
caseFlag - flag for case sensitivitypublic static int GetCategoryPriority(long category)
category - a long integer value of a category