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

import org.dom4j.Attribute;
import org.dom4j.Element;
import org.dom4j.QName;

public class AttributeHelper {
    protected AttributeHelper() {
    }

    /*
     * Enabled aggressive block sorting
     */
    protected static boolean booleanValue(Attribute attribute) {
        Object object;
        if (attribute == null || (object = attribute.getData()) == null) {
            return false;
        }
        if (object instanceof Boolean) {
            return (Boolean)object;
        }
        return "true".equalsIgnoreCase(object.toString());
    }

    public static boolean booleanValue(Element element, String string2) {
        return AttributeHelper.booleanValue(element.attribute(string2));
    }

    public static boolean booleanValue(Element element, QName qName) {
        return AttributeHelper.booleanValue(element.attribute(qName));
    }
}

