All Implemented Interfaces:
android.os.Parcelable

public final class IbanParser extends Parser<IbanParser.Result>
A parser that can extract IBAN (International Bank Account Number) from OCR result.
  • Field Details

    • CREATOR

      public static final android.os.Parcelable.Creator<IbanParser> CREATOR
  • Constructor Details

    • IbanParser

      public IbanParser()
  • Method Details

    • setCountryCodeWhitelist

      public void setCountryCodeWhitelist(@Nullable String[] countryCodeWhitelist)
      Set of allowed country codes. If whitelist is defined, only IBANs with defined country codes will be recognized. For example to allow only Croatian IBANs define whitelist with country code "HR". If whitelist is not defined, or if it is set to null, all valid IBANs will be returned. By default, this is set to '[]'
    • getCountryCodeWhitelist

      @Nullable public String[] getCountryCodeWhitelist()
      Set of allowed country codes. If whitelist is defined, only IBANs with defined country codes will be recognized. For example to allow only Croatian IBANs define whitelist with country code "HR". If whitelist is not defined, or if it is set to null, all valid IBANs will be returned. By default, this is set to '[]'
    • setAlwaysReturnPrefix

      public void setAlwaysReturnPrefix(boolean alwaysReturnPrefix)
      Should prefix (country code) always be returned. By default, this is set to 'false'
    • shouldAlwaysReturnPrefix

      public boolean shouldAlwaysReturnPrefix()
      Should prefix (country code) always be returned. By default, this is set to 'false'
    • terminateNative

      protected void terminateNative(long nativeContext)
      Specified by:
      terminateNative in class Entity<IbanParser.Result>
    • serializeNativeSettings

      @Nullable protected byte[] serializeNativeSettings()
      Specified by:
      serializeNativeSettings in class Entity<IbanParser.Result>
    • deserializeNativeSettings

      protected void deserializeNativeSettings(@NonNull byte[] serializedSettings)
      Specified by:
      deserializeNativeSettings in class Entity<IbanParser.Result>
    • clone

      public IbanParser clone()
      Description copied from class: Entity
      Create a copy of the entity. This is required if properties of the entity must be modified while background thread performs processing. In order to avoid race conditions, changing properties is not allowed while entity is used in background processing. However, you are able to make a copy of the entity, change properties of it and then update the RecognizerRunnerView or RecognizerRunner with the updated entity hierarchy.
      Specified by:
      clone in class Entity<IbanParser.Result>
      Returns:
      a copy of the entity
    • consumeResultFrom

      public void consumeResultFrom(@NonNull Entity other)
      Description copied from class: Entity
      Consume result from other entity. The result from other will be put instead current result of this entity. This method is used inside BaseIntentTransferable.loadFromIntent(Intent) and similar methods to replace the result content of the saved entities with results that have arrived over Intent
      Specified by:
      consumeResultFrom in class Entity<IbanParser.Result>
      Parameters:
      other - Entity from which result should be consumed.
    • consumeResult

      public void consumeResult(@NonNull IbanParser.Result resultToConsume)
      Description copied from class: Parser
      Consumes given result. The given result will be put instead current result of this entity.
      Specified by:
      consumeResult in class Parser<IbanParser.Result>
      Parameters:
      resultToConsume - Result that should be consumed.
    • clearResult

      public void clearResult()
      Description copied from class: Parser
      Clears parser result.
      Specified by:
      clearResult in class Parser<IbanParser.Result>