Package com.swabunga.spell.engine
Class PropertyConfiguration
java.lang.Object
com.swabunga.spell.engine.Configuration
com.swabunga.spell.engine.PropertyConfiguration
Implementation class to read the properties controlling the spell engine.
The properties are read form the
configuration.properties
file.- Author:
- aim4min
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe name of the file containing spell engine propertiesThe persistent set of properties supported by the spell engineFields inherited from class com.swabunga.spell.engine.Configuration
COST_CHANGE_CASE, COST_INSERT_CHAR, COST_REMOVE_CHAR, COST_SUBST_CHARS, COST_SWAP_CHARS, SPELL_IGNOREDIGITWORDS, SPELL_IGNOREINTERNETADDRESSES, SPELL_IGNOREMIXEDCASE, SPELL_IGNOREMULTIPLEWORDS, SPELL_IGNORESENTENCECAPITALIZATION, SPELL_IGNOREUPPERCASE, SPELL_THRESHOLD
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs and loads spell engine properties configuration. -
Method Summary
Modifier and TypeMethodDescriptionboolean
getBoolean
(String key) Gets one of the boolean constantsint
getInteger
(String key) Gets one of the integer constantsvoid
save()
Writes the property list (key and element pairs) in the PropertyConfiguration file.void
setBoolean
(String key, boolean value) Sets one of the boolean constantsvoid
setInteger
(String key, int value) Sets one of the integer constantsMethods inherited from class com.swabunga.spell.engine.Configuration
getConfiguration, getConfiguration
-
Field Details
-
prop
The persistent set of properties supported by the spell engine -
filename
The name of the file containing spell engine properties
-
-
Constructor Details
-
PropertyConfiguration
public PropertyConfiguration()Constructs and loads spell engine properties configuration.
-
-
Method Details
-
getBoolean
Description copied from class:Configuration
Gets one of the boolean constants- Specified by:
getBoolean
in classConfiguration
- Parameters:
key
- one of the boolean constants defined in this class- Returns:
- boolean value of the setting
- See Also:
-
getInteger
Description copied from class:Configuration
Gets one of the integer constants- Specified by:
getInteger
in classConfiguration
- Parameters:
key
- one of the integer constants defined in this class- Returns:
- int value of the setting
- See Also:
-
setBoolean
Description copied from class:Configuration
Sets one of the boolean constants- Specified by:
setBoolean
in classConfiguration
- Parameters:
key
- one of the boolean constants defined in this classvalue
- new boolean value of this setting- See Also:
-
setInteger
Description copied from class:Configuration
Sets one of the integer constants- Specified by:
setInteger
in classConfiguration
- Parameters:
key
- one of the integer constants defined in this classvalue
- new integer value of the constant- See Also:
-
save
public void save()Writes the property list (key and element pairs) in the PropertyConfiguration file.
-