AFEVarAttrTest.java 1008 Bytes
/*
 * Decompiled with CFR 0_118.
 */
package com.adobe.xfa.text;

import com.adobe.xfa.text.AFEAttrMap;
import com.adobe.xfa.text.AFEVarAttr;

class AFEVarAttrTest
extends AFEVarAttr {
    private AFEVarAttr mBase;
    private int mIndex;
    private Object mValue;

    AFEVarAttrTest(AFEAttrMap afeAttrMap) {
        super(afeAttrMap);
    }

    @Override
    public boolean equals(Object object) {
        return super.equals(object);
    }

    @Override
    public int hashCode() {
        return super.hashCode();
    }

    AFEVarAttr create() {
        AFEVarAttr result = new AFEVarAttr(this.mBase);
        result.setAttr(this.mIndex, this.mValue);
        return result;
    }

    @Override
    Object getAttr(int index) {
        return index == this.mIndex ? this.mValue : this.mBase.getAttr(index);
    }

    void setup(AFEVarAttr base, Object key, Object value) {
        this.mBase = base;
        this.mIndex = this.getAFEAttrMap().mapAFEIndex(key);
        this.mValue = value;
    }
}