Package com.microblink.blinkid.entities.recognizers.blinkid.generic

# Class CustomClassRules

java.lang.Object
com.microblink.blinkid.entities.recognizers.blinkid.generic.CustomClassRules

public class CustomClassRules extends Object
Object representing custom rules of mandatory fields for each class of a document.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static class`
  `CustomClassRules.Builder`
  Builder for `CustomClassRules`.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `CustomClassRules(Country country, Region region, Type type, DetailedFieldType[] detailedFieldTypes)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static CustomClassRules`
  `createFromNative(int country, int region, int type, int[] detailedFieldTypes)`
  This method is called from native code to build `CustomClassRules` from native object.
  `Country`
  `getCountry()`
  Country of the document class.
  `DetailedFieldType[]`
  `getDetailedFieldTypes()`
  Array of detailed field types that are mandatory for the document class.
  `Region`
  `getRegion()`
  Region of the document class.
  `Type`
  `getType()`
  Type of the document class.
  `int[]`
  `serializeToArray()`
  Serializes `CustomClassRules` to int array.
  `static int[]`
  `serializeToArray(CustomClassRules[] array)`

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

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

- ## Constructor Details

  - ### CustomClassRules

    public CustomClassRules(@Nullable Country country, @Nullable Region region, @Nullable Type type, DetailedFieldType[] detailedFieldTypes)

- ## Method Details

  - ### createFromNative

    public static CustomClassRules createFromNative(int country, int region, int type, int[] detailedFieldTypes)
    This method is called from native code to build `CustomClassRules` from native object.

  - ### getCountry

    @Nullable public Country getCountry()
    Country of the document class.

  - ### getRegion

    @Nullable public Region getRegion()
    Region of the document class.

  - ### getType

    @Nullable public Type getType()
    Type of the document class.

  - ### getDetailedFieldTypes

    public DetailedFieldType[] getDetailedFieldTypes()
    Array of detailed field types that are mandatory for the document class.

  - ### serializeToArray

    @NonNull public int[] serializeToArray()
    Serializes `CustomClassRules` to int array.
    Returns:
      rules serialized to array

  - ### serializeToArray

    public static int[] serializeToArray(CustomClassRules[] array)