public final class DateParser extends Parser
Modifier and Type | Class and Description |
---|---|
static class |
DateParser.Result |
Modifier and Type | Field and Description |
---|---|
static android.os.Parcelable.Creator |
CREATOR |
CLASS_NAME
Constructor and Description |
---|
DateParser() |
Modifier and Type | Method and Description |
---|---|
void |
clearResult()
Clears parser result.
|
DateParser |
clone()
Create a copy of the entity.
|
void |
consumeResult(DateParser.Result resultToConsume)
Consumes given result.
|
void |
consumeResultFrom(Entity other)
Consume result from other entity.
|
protected void |
deserializeNativeSettings(byte[] serializedSettings) |
DateFormat[] |
getDateFormats()
Returns current date formats.
|
char[] |
getDateSeparatorChars()
Specifies the date separator characters between date parts (day, month, year) that will be
accepted by date parser.
|
protected byte[] |
serializeNativeSettings() |
void |
setDateFormats(DateFormat[] dateFormats)
Specifies the date formats that will be accepted by date parser.
|
void |
setDateSeparatorChars(char[] dateSeparatorChars)
Specifies the date separator characters between date parts (day, month, year) that will be
accepted by date parser.
|
protected void |
terminateNative(long nativeContext) |
getPriority, isRequired, setRequired
describeContents, finalize, getNativeContext, getResult, nativeGetNativeResultContext, readFromParcel, writeToParcel
public void setDateSeparatorChars(@Nullable char[] dateSeparatorChars)
@Nullable public char[] getDateSeparatorChars()
public void setDateFormats(DateFormat[] dateFormats)
DateFormat
enum will be accepted (all formats in which month
is numeric).dateFormats
- Array of expected date formats, if it is null
or empty,
date formats will be set to default value.public DateFormat[] getDateFormats()
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 DateParser 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 DateParser.Result resultToConsume)
Parser
consumeResult
in class Parser
resultToConsume
- Result that should be consumed.public void clearResult()
Parser
clearResult
in class Parser