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

import java.util.Collections;
import java.util.Map;
import org.dom4j.Element;
import org.dom4j.Node;
import org.dom4j.tree.AbstractProcessingInstruction;
import org.dom4j.tree.DefaultProcessingInstruction;

public class FlyweightProcessingInstruction
extends AbstractProcessingInstruction {
    protected String target;
    protected String text;
    protected Map values;

    public FlyweightProcessingInstruction() {
    }

    public FlyweightProcessingInstruction(String string2, String string3) {
        this.target = string2;
        this.text = string3;
        this.values = this.parseValues(string3);
    }

    public FlyweightProcessingInstruction(String string2, Map map) {
        this.target = string2;
        this.values = map;
        this.text = this.toString(map);
    }

    @Override
    protected Node createXPathResult(Element element) {
        return new DefaultProcessingInstruction(element, this.getTarget(), this.getText());
    }

    @Override
    public String getTarget() {
        return this.target;
    }

    @Override
    public String getText() {
        return this.text;
    }

    @Override
    public String getValue(String string2) {
        String string3 = (String)this.values.get((Object)string2);
        if (string3 == null) {
            string3 = "";
        }
        return string3;
    }

    @Override
    public Map getValues() {
        return Collections.unmodifiableMap((Map)this.values);
    }

    @Override
    public void setTarget(String string2) {
        throw new UnsupportedOperationException("This PI is read-only and cannot be modified");
    }
}

