Class DateResult
- java.lang.Object
-
- com.microblink.documentverification.results.date.DateResult
-
-
Field Summary
Fields Modifier and Type Field Description static android.os.Parcelable.Creator<DateResult>CREATOR
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DateResultcreateFromDMY(int day, int month, int year, java.lang.String originalDateString)This method is called from native code to buildDateResultfrom native object.static DateResultcreateUnparsed(java.lang.String originalDateString)This method is called from native code to buildDateResultfrom native object, when date has not been successfully parsed from the givenoriginalDateString.intdescribeContents()DategetDate()Date getter, ifDaterepresentation of date result exists returns it, otherwise returns null.java.lang.ObjectgetNativeResult()Returns the native java object containing the result.java.lang.StringgetOriginalDateString()Returns original string representation of the date which has been extracted from the OCR result.java.lang.StringgetStringResult()Returns the string version of the result.java.lang.StringtoString()voidwriteToParcel(android.os.Parcel parcel, int i)
-
-
-
Field Detail
-
CREATOR
@NonNull public static final android.os.Parcelable.Creator<DateResult> CREATOR
-
-
Method Detail
-
getOriginalDateString
@NonNull public java.lang.String getOriginalDateString()
Returns original string representation of the date which has been extracted from the OCR result. If it is successfully parsed toDateobject, it can be obtained by usinggetDate()method.- Returns:
- original string representation of the date which has been extracted from the OCR result
-
getDate
@Nullable public Date getDate()
Date getter, ifDaterepresentation of date result exists returns it, otherwise returns null. To obtain original date string usegetOriginalDateString()method.- Returns:
- if
Daterepresentation of date result exists returns it, otherwise returns null.
-
createFromDMY
@NonNull public static DateResult createFromDMY(int day, int month, int year, @NonNull java.lang.String originalDateString)
This method is called from native code to buildDateResultfrom native object.- Parameters:
day- day of the monthmonth- month of the year from interval [1,12]year- full yearoriginalDateString- original string from which native object has been parsed- Returns:
DateResultobject
-
createUnparsed
@NonNull public static DateResult createUnparsed(@NonNull java.lang.String originalDateString)
This method is called from native code to buildDateResultfrom native object, when date has not been successfully parsed from the givenoriginalDateString.- Parameters:
originalDateString- original string from which native object has been created and which has not been successfully parsed to date.- Returns:
DateResultobject
-
describeContents
public int describeContents()
- Specified by:
describeContentsin interfaceandroid.os.Parcelable
-
writeToParcel
public void writeToParcel(@NonNull android.os.Parcel parcel, int i)- Specified by:
writeToParcelin interfaceandroid.os.Parcelable
-
getNativeResult
@Nullable public java.lang.Object getNativeResult()
Description copied from interface:ResultReturns the native java object containing the result. For example, forDateResult, this method will returnDateobject.- Specified by:
getNativeResultin interfaceResult- Returns:
- the native java object containing the result.
-
getStringResult
@Nullable public java.lang.String getStringResult()
Description copied from interface:ResultReturns the string version of the result. For example, forDateResult, this method will return original string from which date was parsed (same asgetOriginalDateString().- Specified by:
getStringResultin interfaceResult- Returns:
- string version of the result
-
toString
@NonNull public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-