public abstract class Configuration
extends java.lang.Object
Also includes SPELL_* constants that control how misspellings are detected, for example, how to handle mixed-case words, etc.
EditDistance| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
COST_CHANGE_CASE
Used by EditDistance: the cost of having to change case, for example,
from i to I.
|
static java.lang.String |
COST_INSERT_CHAR
Used by EditDistance: the cost of having to insert a character.
|
static java.lang.String |
COST_REMOVE_CHAR
Used by EditDistance: the cost of having to remove a character.
|
static java.lang.String |
COST_SUBST_CHARS
Used by EditDistance: the cost of having to substitute one character for
another.
|
static java.lang.String |
COST_SWAP_CHARS
Used by EditDistance: the cost of having to swap two adjoining
characters.
|
static java.lang.String |
SPELL_IGNORE_DIGIT_WORDS
words that have digits in them are not spell checked, example: "mach5".
|
static java.lang.String |
SPELL_IGNORE_INTERNET_ADDRESSES
words that look like an Internet address are not spell checked, example:
"http://www.google.com".
|
static java.lang.String |
SPELL_IGNORE_MIXED_CASE
words that have mixed case are not spell checked, example:
"SpellChecker".
|
static java.lang.String |
SPELL_IGNORE_MULTIPLE_WORDS
I don't know what this does.
|
static java.lang.String |
SPELL_IGNORE_SENTENCE_CAPITALIZATION
The first word of a sentence is expected to start with an upper case
letter.
|
static java.lang.String |
SPELL_IGNORE_UPPER_CASE
words that are all upper case are not spell checked, example: "CIA".
|
static java.lang.String |
SPELL_THRESHOLD
The maximum cost of suggested spelling.
|
| Constructor and Description |
|---|
Configuration() |
| Modifier and Type | Method and Description |
|---|---|
abstract boolean |
getBoolean(java.lang.String key)
Gets one of the boolean constants
|
static Configuration |
getConfiguration()
gets a new default Configuration
|
static Configuration |
getConfiguration(java.lang.String configurationClassName)
Returns a new instance of a configurationClassName class.
|
abstract int |
getInteger(java.lang.String key)
Gets one of the integer constants
|
abstract void |
setBoolean(java.lang.String key,
boolean value)
Sets one of the boolean constants
|
abstract void |
setInteger(java.lang.String key,
int value)
Sets one of the integer constants
|
public static final java.lang.String COST_REMOVE_CHAR
public static final java.lang.String COST_INSERT_CHAR
public static final java.lang.String COST_SWAP_CHARS
public static final java.lang.String COST_CHANGE_CASE
public static final java.lang.String COST_SUBST_CHARS
public static final java.lang.String SPELL_THRESHOLD
public static final java.lang.String SPELL_IGNORE_UPPER_CASE
public static final java.lang.String SPELL_IGNORE_MIXED_CASE
public static final java.lang.String SPELL_IGNORE_INTERNET_ADDRESSES
public static final java.lang.String SPELL_IGNORE_DIGIT_WORDS
public static final java.lang.String SPELL_IGNORE_MULTIPLE_WORDS
public static final java.lang.String SPELL_IGNORE_SENTENCE_CAPITALIZATION
public abstract int getInteger(java.lang.String key)
key - one of the integer constants defined in this classpublic abstract boolean getBoolean(java.lang.String key)
key - one of the boolean constants defined in this classpublic abstract void setInteger(java.lang.String key,
int value)
key - one of the integer constants defined in this classvalue - new integer value of the constantpublic abstract void setBoolean(java.lang.String key,
boolean value)
key - one of the boolean constants defined in this classvalue - new boolean value of this settingpublic static final Configuration getConfiguration()
public static final Configuration getConfiguration(java.lang.String configurationClassName)
configurationClassName - a name for the configuration class