package com.kofax.android.abc.document; import android.graphics.Rect; /* loaded from: classes3.dex */ public class Element { private boolean m_owner; private long m_ptr; public static native boolean nativeStaticInitializer(); public native long nativeCreate(); public native long nativeCreate(int i, int i2, Rect rect, String str); public native long nativeCreateCopy(long j); public native void nativeDispose(); public native int nativeGetFieldIndex(long j); public native int nativeGetId(); public native int nativeGetPageIndex(); public native Rect nativeGetRectangle(long j, boolean z, boolean z2); public native String nativeGetToken(); public native void nativeSetPageIndex(int i); public native void nativeSetRectangle(Rect rect); public native void nativeSetToken(String str); static { if (!nativeStaticInitializer()) { throw new RuntimeException("com.kofax.android.abc.document.Element: Static initializer failed."); } } public Element() { this.m_ptr = nativeCreate(); this.m_owner = true; } public Element(long j, boolean z) { if (j == 0) { throw new IllegalArgumentException("com.kofax.android.abc.document.Element: ptr value cannot be null."); } this.m_ptr = z ? nativeCreateCopy(j) : j; this.m_owner = z; } public Element(int i, int i2, Rect rect, String str) { this.m_ptr = nativeCreate(i, i2, rect, str); } public void dispose() { if (this.m_owner) { nativeDispose(); this.m_ptr = 0L; } } public int getId() { return nativeGetId(); } public int getPageIndex() { return nativeGetPageIndex(); } public void setPageIndex(int i) { nativeSetPageIndex(i); } public Rect getRectangle() { return nativeGetRectangle(0L, false, false); } public Rect getRectangle(Document document, boolean z, boolean z2) { return nativeGetRectangle(document.getPtr(), z, z2); } public void setRectangle(Rect rect) { nativeSetRectangle(rect); } public String getToken() { return nativeGetToken(); } public void setToken(String str) { nativeSetToken(str); } public int getFieldIndex(Document document) { return nativeGetFieldIndex(document.getPtr()); } public long getPtr() { return this.m_ptr; } }