Package com.swabunga.spell.engine
Class PropertyConfiguration
- java.lang.Object
-
- com.swabunga.spell.engine.Configuration
-
- com.swabunga.spell.engine.PropertyConfiguration
-
public class PropertyConfiguration extends Configuration
Implementation class to read the properties controlling the spell engine. The properties are read form theconfiguration.propertiesfile.- Author:
- aim4min
-
-
Field Summary
Fields Modifier and Type Field Description java.net.URLfilenameThe name of the file containing spell engine propertiesjava.util.PropertiespropThe persistent set of properties supported by the spell engine-
Fields 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
Constructors Constructor Description PropertyConfiguration()Constructs and loads spell engine properties configuration.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleangetBoolean(java.lang.String key)Gets one of the boolean constantsintgetInteger(java.lang.String key)Gets one of the integer constantsvoidsave()Writes the property list (key and element pairs) in the PropertyConfiguration file.voidsetBoolean(java.lang.String key, boolean value)Sets one of the boolean constantsvoidsetInteger(java.lang.String key, int value)Sets one of the integer constants-
Methods inherited from class com.swabunga.spell.engine.Configuration
getConfiguration, getConfiguration
-
-
-
-
Method Detail
-
getBoolean
public boolean getBoolean(java.lang.String key)
Description copied from class:ConfigurationGets one of the boolean constants- Specified by:
getBooleanin classConfiguration- Parameters:
key- one of the boolean constants defined in this class- Returns:
- boolean value of the setting
- See Also:
Configuration.getBoolean(String)
-
getInteger
public int getInteger(java.lang.String key)
Description copied from class:ConfigurationGets one of the integer constants- Specified by:
getIntegerin classConfiguration- Parameters:
key- one of the integer constants defined in this class- Returns:
- int value of the setting
- See Also:
Configuration.getInteger(String)
-
setBoolean
public void setBoolean(java.lang.String key, boolean value)Description copied from class:ConfigurationSets one of the boolean constants- Specified by:
setBooleanin classConfiguration- Parameters:
key- one of the boolean constants defined in this classvalue- new boolean value of this setting- See Also:
Configuration.setBoolean(String, boolean)
-
setInteger
public void setInteger(java.lang.String key, int value)Description copied from class:ConfigurationSets one of the integer constants- Specified by:
setIntegerin classConfiguration- Parameters:
key- one of the integer constants defined in this classvalue- new integer value of the constant- See Also:
Configuration.setInteger(String, int)
-
save
public void save()
Writes the property list (key and element pairs) in the PropertyConfiguration file.
-
-