/*
 * Decompiled with CFR 0_110.
 * 
 * Could not load the following classes:
 *  java.lang.Object
 *  java.lang.String
 */
package org.dom4j.bean;

import org.dom4j.Element;
import org.dom4j.QName;
import org.dom4j.bean.BeanAttributeList;
import org.dom4j.bean.BeanElement;
import org.dom4j.tree.AbstractAttribute;

public class BeanAttribute
extends AbstractAttribute {
    private final BeanAttributeList beanList;
    private final int index;

    public BeanAttribute(BeanAttributeList beanAttributeList, int n) {
        this.beanList = beanAttributeList;
        this.index = n;
    }

    @Override
    public Object getData() {
        return this.beanList.getData(this.index);
    }

    @Override
    public Element getParent() {
        return this.beanList.getParent();
    }

    @Override
    public QName getQName() {
        return this.beanList.getQName(this.index);
    }

    @Override
    public String getValue() {
        Object object = this.getData();
        if (object != null) {
            return object.toString();
        }
        return null;
    }

    @Override
    public void setData(Object object) {
        this.beanList.setData(this.index, object);
    }

    @Override
    public void setValue(String string2) {
        this.beanList.setData(this.index, string2);
    }
}

