Class SpelledCurrency
java.lang.Object
com.aquima.interactions.framework.mask.impl.AbstractMask
com.aquima.interactions.framework.mask.impl.SpelledCurrency
- All Implemented Interfaces:
IMask
Mask to spell a Currency object.
Example: Currency(500.25) -> vijfhonderd euro en vijfentwintig cent
Possible parameters
- spellzerocents: true/false, default true, display cents part if cents part is 0
- currency: euro/pound/dollar/etc., default euro, used for message retrieval (from messages.properties)
- Since:
- 6.0
- Author:
- Jon van Leuven
-
Constructor Summary
ConstructorsConstructorDescriptionSpelledCurrency
(ISpellEngine spellEngine) Construct a spelled currency mask. -
Method Summary
Modifier and TypeMethodDescriptionprotected String
applySingleValue
(ISingleValue singleValue, IMaskContext context, ILanguage language) This method is called when this mask is applied.protected DataType[]
Should return the datatypes for which this mask can be applied.Methods inherited from class com.aquima.interactions.framework.mask.impl.AbstractMask
apply
-
Constructor Details
-
SpelledCurrency
Construct a spelled currency mask.- Parameters:
spellEngine
- Spell engine used for spelling currencies.
-
-
Method Details
-
getValidDataTypes
Description copied from class:AbstractMask
Should return the datatypes for which this mask can be applied.- Specified by:
getValidDataTypes
in classAbstractMask
- Returns:
- Array of datatypes.
-
applySingleValue
protected String applySingleValue(ISingleValue singleValue, IMaskContext context, ILanguage language) throws Exception Description copied from class:AbstractMask
This method is called when this mask is applied.- Specified by:
applySingleValue
in classAbstractMask
- Parameters:
singleValue
- The value, never null and never unknown.context
- Mask contextlanguage
- the language- Returns:
- The applied mask result.
- Throws:
Exception
- When something went wrong.
-