Modifier and Type | Field and Description |
---|---|
static android.os.Parcelable.Creator |
CREATOR |
Modifier and Type | Method and Description |
---|---|
static DateResult |
createFromDMY(int day,
int month,
int year,
java.lang.String originalDateString)
This method is called from native code to build
DateResult from native object. |
static DateResult |
createUnparsed(java.lang.String originalDateString)
This method is called from native code to build
DateResult from native object, when
date has not been successfully parsed from the given originalDateString . |
int |
describeContents() |
Date |
getDate()
Date getter, if
Date representation of date result exists returns it,
otherwise returns null. |
java.lang.Object |
getNativeResult()
Returns the native java object containing the result.
|
java.lang.String |
getOriginalDateString()
Returns original string representation of the date which has been extracted from the OCR result.
|
java.lang.String |
getStringResult()
Returns the string version of the result.
|
java.lang.String |
toString() |
void |
writeToParcel(android.os.Parcel parcel,
int i) |
@NonNull public java.lang.String getOriginalDateString()
Date
object, it can be obtained by using DateResult.getDate()
method.@Nullable public Date getDate()
Date
representation of date result exists returns it,
otherwise returns null. To obtain original date string use DateResult.getOriginalDateString()
method.Date
representation of date result exists returns it,
otherwise returns null.@NonNull public static DateResult createFromDMY(int day, int month, int year, @NonNull java.lang.String originalDateString)
DateResult
from native object.day
- day of the monthmonth
- month of the year from interval [1,12]year
- full yearoriginalDateString
- original string from which native object has been parsedDateResult
object@NonNull public static DateResult createUnparsed(@NonNull java.lang.String originalDateString)
DateResult
from native object, when
date has not been successfully parsed from the given originalDateString
.originalDateString
- original string from which native object has been created and
which has not been successfully parsed to date.DateResult
objectpublic int describeContents()
describeContents
in interface android.os.Parcelable
public void writeToParcel(@NonNull android.os.Parcel parcel, int i)
writeToParcel
in interface android.os.Parcelable
@Nullable public java.lang.Object getNativeResult()
Result
DateResult
, this method
will return Date
object.getNativeResult
in interface Result
@Nullable public java.lang.String getStringResult()
Result
DateResult
, this method
will return original string from which date was parsed (same as DateResult.getOriginalDateString()
.getStringResult
in interface Result
@NonNull public java.lang.String toString()
toString
in class java.lang.Object