Class Parser<T extends Parser.Result>
java.lang.Object
com.microblink.photopay.entities.Entity<T>
com.microblink.photopay.entities.parsers.Parser<T>
- All Implemented Interfaces:
android.os.Parcelable
- Direct Known Subclasses:
AmountParser
,AustraliaAbnParser
,AustraliaAccountParser
,AustraliaBillerParser
,AustraliaBsbParser
,AustraliaReferenceParser
,AustriaReferenceParser
,BosniaAndHerzegovinaAccountParser
,BosniaAndHerzegovinaReferenceParser
,CroatiaAmountParser
,CroatiaReferenceParser
,CzechiaAccountParser
,CzechiaVariabilniSymbolParser
,DateParser
,GermanyReferenceParser
,HungaryAccountParser
,HungaryPayerIdParser
,IbanParser
,MacedoniaAccountParser
,MacedoniaReferenceParser
,MontenegroAccountParser
,MontenegroReferenceParser
,RawParser
,RegexParser
,SerbiaAccountParser
,SerbiaReferenceParser
,SloveniaReferenceParser
,SwedenAmountParser
,SwedenGiroNumberParser
,SwedenReferenceParser
,SwedenSlipCodeParser
Base class for all parsers which are used for data extraction.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsFields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract void
Clears parser result.abstract void
consumeResult
(T resultToConsume) Consumes given result.int
boolean
Returns whether parser configured with this parser settings object will be requiredvoid
setRequired
(boolean required) Defines whether the parser configured with this parser settings object will be required or optional.Methods inherited from class com.microblink.photopay.entities.Entity
clone, consumeResultFrom, describeContents, deserializeNativeSettings, finalize, getNativeContext, getResult, nativeGetNativeResultContext, readFromParcel, serializeNativeSettings, terminateNative, writeToParcel
-
Field Details
-
CLASS_NAME
- See Also:
-
-
Constructor Details
-
Parser
-
Parser
-
-
Method Details
-
setRequired
public void setRequired(boolean required) Defines whether the parser configured with this parser settings object will be required or optional. Data will not be returned viaScanResultListener.onScanningDone(RecognitionSuccessType)
until all parsers that are required have produced result. By default, every parser is required. Set this to false in cases when you will manually manage which parser has produced result, and which did not (for example in random scan use case).- Parameters:
required
- whether this parser is required or not
-
isRequired
public boolean isRequired()Returns whether parser configured with this parser settings object will be required- Returns:
- whether parser configured with this parser settings object will be required
-
getPriority
public int getPriority() -
consumeResult
Consumes given result. The given result will be put instead current result of this entity.- Parameters:
resultToConsume
- Result that should be consumed.
-
clearResult
public abstract void clearResult()Clears parser result.
-