public final class AmountParser extends Parser
Modifier and Type | Class and Description |
---|---|
static class |
AmountParser.Result |
Modifier and Type | Field and Description |
---|---|
static android.os.Parcelable.Creator |
CREATOR |
CLASS_NAME
Constructor and Description |
---|
AmountParser() |
Modifier and Type | Method and Description |
---|---|
void |
clearResult()
Clears parser result.
|
AmountParser |
clone()
Create a copy of the entity.
|
void |
consumeResult(AmountParser.Result resultToConsume)
Consumes given result.
|
void |
consumeResultFrom(Entity other)
Consume result from other entity.
|
protected void |
deserializeNativeSettings(byte[] serializedSettings) |
boolean |
isArabicIndicMode()
Indicates whether Arabic-Indic mode is enabled.
|
protected byte[] |
serializeNativeSettings() |
void |
setAllowMissingDecimals(boolean allowMissingDecimals)
Indicates whether amounts without decimal are accepted as valid.
|
void |
setAllowNegativeAmounts(boolean allowNegativeAmounts)
Indicates whether negative values are accepted as valid amounts.
|
void |
setAllowSpaceSeparators(boolean allowSpaceSeparators)
Indicates whether amounts with space separators between groups of digits(thousands) are allowed.
|
void |
setArabicIndicMode(boolean arabicIndicMode)
Indicates whether Arabic-Indic mode is enabled.
|
boolean |
shouldAllowMissingDecimals()
Indicates whether amounts without decimal are accepted as valid.
|
boolean |
shouldAllowNegativeAmounts()
Indicates whether negative values are accepted as valid amounts.
|
boolean |
shouldAllowSpaceSeparators()
Indicates whether amounts with space separators between groups of digits(thousands) are allowed.
|
protected void |
terminateNative(long nativeContext) |
getPriority, isRequired, setRequired
describeContents, finalize, getNativeContext, getResult, nativeGetNativeResultContext, readFromParcel, writeToParcel
public void setAllowSpaceSeparators(boolean allowSpaceSeparators)
public boolean shouldAllowSpaceSeparators()
public void setAllowMissingDecimals(boolean allowMissingDecimals)
true
.
Setting this to true
can yield to more false positives
because any set of consequent digits can represent valid amount.
By default, this is set to 'false'public boolean shouldAllowMissingDecimals()
true
.
Setting this to true
can yield to more false positives
because any set of consequent digits can represent valid amount.
By default, this is set to 'false'public void setArabicIndicMode(boolean arabicIndicMode)
public boolean isArabicIndicMode()
public void setAllowNegativeAmounts(boolean allowNegativeAmounts)
true
can yield to more false positives.
By default, this is set to 'false'public boolean shouldAllowNegativeAmounts()
true
can yield to more false positives.
By default, this is set to 'false'protected void terminateNative(long nativeContext)
terminateNative
in class Entity
@Nullable protected byte[] serializeNativeSettings()
serializeNativeSettings
in class Entity
protected void deserializeNativeSettings(@NonNull byte[] serializedSettings)
deserializeNativeSettings
in class Entity
public AmountParser clone()
Entity
RecognizerRunnerView
or RecognizerRunner
with the updated entity hierarchy.public void consumeResultFrom(@NonNull Entity other)
Entity
com.microblink.blinkinput.entities.recognizers.RecognizerBundle#loadFromIntent(Intent)
and similar methods to replace the result content of the saved entities with results that
have arrived over Intent
consumeResultFrom
in class Entity
other
- Entity from which result should be consumed.public void consumeResult(@NonNull AmountParser.Result resultToConsume)
Parser
consumeResult
in class Parser
resultToConsume
- Result that should be consumed.public void clearResult()
Parser
clearResult
in class Parser