java.lang.Object
com.microblink.blinkid.results.date.Date
All Implemented Interfaces:
android.os.Parcelable, SimpleDateResult

public class Date extends Object implements android.os.Parcelable, SimpleDateResult
Helper class for obtaining date results.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface android.os.Parcelable

    android.os.Parcelable.ClassLoaderCreator<T extends Object>, android.os.Parcelable.Creator<T extends Object>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final android.os.Parcelable.Creator<Date>
     

    Fields inherited from interface android.os.Parcelable

    CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
  • Method Summary

    Modifier and Type
    Method
    Description
    static Date
    createFromDMY(int day, int month, int year, String originalDateString, boolean isFilledByDomainKnowledge)
    This method is called from native code to build Date from native object.
    static Date
    createUnparsed(String originalDateString, boolean isFilledByDomainKnowledge)
    This method is called from native code to build Date from native object, when date has not been successfully parsed from the given originalDateString.
    int
     
    Date getter, if SimpleDate representation of date result exists returns it, otherwise returns null.
    Returns original string representation of the date which has been extracted from the OCR result.
    boolean
    Indicates that date does not appear on the document but is filled by our internal domain knowledge.
     
    void
    writeToParcel(android.os.Parcel parcel, int i)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • CREATOR

      @NonNull public static final android.os.Parcelable.Creator<Date> CREATOR
  • Method Details

    • getOriginalDateString

      @NonNull public String getOriginalDateString()
      Returns original string representation of the date which has been extracted from the OCR result. If it is successfully parsed to SimpleDate object, it can be obtained by using getDate() method.
      Returns:
      original string representation of the date which has been extracted from the OCR result
    • isFilledByDomainKnowledge

      public boolean isFilledByDomainKnowledge()
      Indicates that date does not appear on the document but is filled by our internal domain knowledge.
      Returns:
      true if the date is filled by our internal domain knowledge
    • getDate

      @Nullable public SimpleDate getDate()
      Date getter, if SimpleDate representation of date result exists returns it, otherwise returns null. To obtain original date string use getOriginalDateString() method.
      Specified by:
      getDate in interface SimpleDateResult
      Returns:
      if SimpleDate representation of date result exists returns it, otherwise returns null.
    • createFromDMY

      @NonNull public static Date createFromDMY(int day, int month, int year, @NonNull String originalDateString, boolean isFilledByDomainKnowledge)
      This method is called from native code to build Date from native object.
      Parameters:
      day - day of the month
      month - month of the year from interval [1,12]
      year - full year
      originalDateString - original string from which native object has been parsed
      Returns:
      Date object
    • createUnparsed

      @NonNull public static Date createUnparsed(@NonNull String originalDateString, boolean isFilledByDomainKnowledge)
      This method is called from native code to build Date from native object, when date has not been successfully parsed from the given originalDateString.
      Parameters:
      originalDateString - original string from which native object has been created and which has not been successfully parsed to date.
      Returns:
      Date object
    • describeContents

      public int describeContents()
      Specified by:
      describeContents in interface android.os.Parcelable
    • writeToParcel

      public void writeToParcel(@NonNull android.os.Parcel parcel, int i)
      Specified by:
      writeToParcel in interface android.os.Parcelable
    • toString

      @NonNull public String toString()
      Overrides:
      toString in class Object