Fields Summary |
---|
public static final int | VALUE_DEFAULTDefault value, accepted by most attributes |
public static final int | VALUE_PRIMARYPrimary collation strength |
public static final int | VALUE_SECONDARYSecondary collation strength |
public static final int | VALUE_TERTIARYTertiary collation strength |
public static final int | VALUE_DEFAULT_STRENGTHDefault collation strength |
public static final int | VALUE_QUATERNARYQuaternary collation strength |
public static final int | VALUE_IDENTICALIdentical collation strength |
public static final int | VALUE_OFFTurn the feature off - works for FRENCH_COLLATION, CASE_LEVEL,
HIRAGANA_QUATERNARY_MODE and DECOMPOSITION_MODE |
public static final int | VALUE_ON |
public static final int | VALUE_SHIFTEDALTERNATE_HANDLING mode constants |
public static final int | VALUE_NON_IGNORABLE |
public static final int | VALUE_LOWER_FIRSTCASE_FIRST mode constants |
public static final int | VALUE_UPPER_FIRST |
public static final int | VALUE_ON_WITHOUT_HANGULNORMALIZATION_MODE mode constants |
public static final int | VALUE_ATTRIBUTE_VALUE_COUNTNumber of attribute value constants |
public static final int | FRENCH_COLLATIONAttribute for direction of secondary weights |
public static final int | ALTERNATE_HANDLINGAttribute for handling variable elements |
public static final int | CASE_FIRSTWho goes first, lower case or uppercase. |
public static final int | CASE_LEVELDo we have an extra case level |
public static final int | NORMALIZATION_MODEAttribute for normalization |
public static final int | STRENGTHAttribute for strength |
public static final int | ATTRIBUTE_COUNTAttribute count |
Methods Summary |
---|
static boolean | checkAttribute(int type, int value)Checks if attribute type and corresponding attribute value is valid
if (value == VALUE_DEFAULT) {
return true;
}
switch (type)
{
case FRENCH_COLLATION :
if (value >= VALUE_OFF && value <= VALUE_ON)
return true;
break;
case ALTERNATE_HANDLING :
if (value >= VALUE_SHIFTED &&
value <= VALUE_NON_IGNORABLE)
return true;
break;
case CASE_FIRST :
if (value >= VALUE_LOWER_FIRST &&
value <= VALUE_UPPER_FIRST)
return true;
break;
case CASE_LEVEL :
return (value == VALUE_ON ||
value <= VALUE_OFF);
case NORMALIZATION_MODE :
return (value == VALUE_OFF || value == VALUE_ON ||
value == VALUE_ON_WITHOUT_HANGUL);
case STRENGTH :
checkStrength(value);
}
return false;
|
static boolean | checkNormalization(int type)Checks if argument is a valid normalization type
if (type != VALUE_ON && type != VALUE_OFF
&& type != VALUE_ON_WITHOUT_HANGUL) {
return false;
}
return true;
|
static boolean | checkStrength(int strength)Checks if argument is a valid collation strength
// package methods --------------------------------------------------
if (strength < VALUE_PRIMARY ||
(strength > VALUE_QUATERNARY && strength != VALUE_IDENTICAL))
return false;
return true;
|
static boolean | checkType(int type)Checks if argument is a valid collation type
if (type < FRENCH_COLLATION || type > STRENGTH)
return false;
return true;
|