Package com.microblink.blinkid.entities.recognizers.templating

# Class TemplatingRecognizer<R extends TemplatingRecognizer.Result>

java.lang.Object
com.microblink.blinkid.entities.Entity<T>
com.microblink.blinkid.entities.recognizers.Recognizer<R>
com.microblink.blinkid.entities.recognizers.templating.TemplatingRecognizer<R>

All Implemented Interfaces:
  `android.os.Parcelable`, `GlareDetectorOptions`, `JsonizableEntity`

Direct Known Subclasses:
  `MrtdRecognizer`

public abstract class TemplatingRecognizer<R extends TemplatingRecognizer.Result> extends Recognizer<R> implements GlareDetectorOptions
Base of all recognizers that support Templating API.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static class`
  `TemplatingRecognizer.Result`

  ## 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 String`
  `CLASS_NAME`

  ### Fields inherited from interface android.os.Parcelable

  `CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE`

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  `protected`
  `TemplatingRecognizer(long nativeRecognizer, R concreteResult)`
  `protected`
  `TemplatingRecognizer(long nativeRecognizer, R concreteResult, android.os.Parcel in)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `consumeResultFrom(Entity other)`
  Consume result from other entity.
  `protected void`
  `readFromParcel(android.os.Parcel in)`
  `protected abstract void`
  `setNativeTemplatingClasses(long[] nativeTemplatingClasses)`
  `final void`
  `setTemplatingClasses(TemplatingClass... classes)`
  Sets zero or more `TemplatingClass` that will try to be matched against document that is being recognized.
  `void`
  `writeToParcel(android.os.Parcel dest, int flags)`

  ### Methods inherited from class com.microblink.blinkid.entities.recognizers.Recognizer

  `clone, getName, isExcludedFromPing, requiresAutofocus, requiresLandscapeMode, signedJsonNativeGet, toSignedJson`

  ### Methods inherited from class com.microblink.blinkid.entities.Entity

  `describeContents, deserializeNativeSettings, finalize, getNativeContext, getResult, nativeGetNativeResultContext, serializeNativeSettings, terminateNative`

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

  ### Methods inherited from interface com.microblink.blinkid.entities.settings.GlareDetectorOptions

  `setDetectGlare, shouldDetectGlare`

- ## Field Details

  - ### CLASS_NAME

    @NonNull public static final String CLASS_NAME
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### TemplatingRecognizer

    protected TemplatingRecognizer(long nativeRecognizer, @NonNull R concreteResult)

  - ### TemplatingRecognizer

    protected TemplatingRecognizer(long nativeRecognizer, @NonNull R concreteResult, @NonNull android.os.Parcel in)

- ## Method Details

  - ### setTemplatingClasses

    public final void setTemplatingClasses(@Nullable TemplatingClass... classes)
    Sets zero or more `TemplatingClass` that will try to be matched against document that is being recognized.
    Parameters:
      `classes` - Zero or more `TemplatingClass` objects representing specific class of documents.

  - ### setNativeTemplatingClasses

    protected abstract void setNativeTemplatingClasses(@Nullable long[] nativeTemplatingClasses)

  - ### consumeResultFrom

    @CallSuper 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<R extends TemplatingRecognizer.Result>`
    Parameters:
      `other` - Entity from which result should be consumed.

  - ### writeToParcel

    public void writeToParcel(@NonNull android.os.Parcel dest, int flags)
    Specified by:
      `writeToParcel` in interface `android.os.Parcelable`
    Overrides:
      `writeToParcel` in class `Entity<R extends TemplatingRecognizer.Result>`

  - ### readFromParcel

    protected void readFromParcel(@NonNull android.os.Parcel in)
    Overrides:
      `readFromParcel` in class `Entity<R extends TemplatingRecognizer.Result>`