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

# Class TemplatingClass

java.lang.Object
com.microblink.blinkid.entities.recognizers.templating.TemplatingClass

All Implemented Interfaces:
  `android.os.Parcelable`

public final class TemplatingClass extends Object implements android.os.Parcelable
Class that represents a specific class of documents when used within Templating API.

- ## 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<TemplatingClass>`
  `CREATOR`

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

  `CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `TemplatingClass()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `consumeResultFrom(TemplatingClass other)`
  `int`
  `describeContents()`
  `protected void`
  `finalize()`
  `ProcessorGroup[]`
  `getClassificationProcessorGroups()`
  Returns the currently set array of classification processor groups.
  `ProcessorGroup[]`
  `getNonClassificationProcessorGroups()`
  Returns the currently set array of non-classification processor groups.
  `<T extends TemplatingRecognizer>
  T`
  `getOwningRecognizer()`
  Returns the `TemplatingRecognizer` which contains this `TemplatingClass` or `null` if this `TemplatingClass` is not contained withing any `TemplatingRecognizer`.
  `void`
  `setClassificationProcessorGroups(ProcessorGroup... processorGroups)`
  Sets processor groups that will be executed before classification, i.e.
  `void`
  `setNonClassificationProcessorGroups(ProcessorGroup... processorGroups)`
  Sets processor groups that will be executed if `TemplatingClassifier.classify(TemplatingClass)` returns `true`.
  `void`
  `setTemplatingClassifier(TemplatingClassifier templatingClassifier)`
  Sets the classifier which will tell whether currently processed document belongs to this class.
  `void`
  `writeToParcel(android.os.Parcel dest, int flags)`

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

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

- ## Field Details

  - ### CREATOR

    @NonNull public static final android.os.Parcelable.Creator<TemplatingClass> CREATOR

- ## Constructor Details

  - ### TemplatingClass

    public TemplatingClass()

- ## Method Details

  - ### setTemplatingClassifier

    public void setTemplatingClassifier(@Nullable TemplatingClassifier templatingClassifier)
    Sets the classifier which will tell whether currently processed document belongs to this class. If set to `null`, existing classifier (if exists) will be cleared and non-classification processor groups will not be executed.
    Parameters:
      `templatingClassifier` - Classifier which will tell whether currently processed document belongs to this class.

  - ### consumeResultFrom

    public void consumeResultFrom(@NonNull TemplatingClass other)

  - ### setClassificationProcessorGroups

    public void setClassificationProcessorGroups(@Nullable ProcessorGroup... processorGroups)
    Sets processor groups that will be executed before classification, i.e. before `TemplatingClassifier.classify(TemplatingClass)` is invoked.
    Parameters:
      `processorGroups` - processor groups that will be executed before classification

  - ### getClassificationProcessorGroups

    @Nullable public ProcessorGroup[] getClassificationProcessorGroups()
    Returns the currently set array of classification processor groups.
    Returns:
      the currently set array of classification processor groups.

  - ### setNonClassificationProcessorGroups

    public void setNonClassificationProcessorGroups(@Nullable ProcessorGroup... processorGroups)
    Sets processor groups that will be executed if `TemplatingClassifier.classify(TemplatingClass)` returns `true`.
    Parameters:
      `processorGroups` - processor groups that will be executed after classification, if classification is positive

  - ### getNonClassificationProcessorGroups

    @Nullable public ProcessorGroup[] getNonClassificationProcessorGroups()
    Returns the currently set array of non-classification processor groups.
    Returns:
      the currently set array of non-classification processor groups.

  - ### getOwningRecognizer

    @Nullable public <T extends TemplatingRecognizer> T getOwningRecognizer()
    Returns the `TemplatingRecognizer` which contains this `TemplatingClass` or `null` if this `TemplatingClass` is not contained withing any `TemplatingRecognizer`.
    Returns:
      the `TemplatingRecognizer` which contains this `TemplatingClass` or `null` if this `TemplatingClass` is not contained withing any `TemplatingRecognizer`.
    Throws:
      `ClassCastException` - if owning recognizer is not of correct type

  - ### finalize

    protected void finalize() throws Throwable
    Overrides:
      `finalize` in class `Object`
    Throws:
      `Throwable`

  - ### describeContents

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

  - ### writeToParcel

    public void writeToParcel(@NonNull android.os.Parcel dest, int flags)
    Specified by:
      `writeToParcel` in interface `android.os.Parcelable`