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

import org.dom4j.Element;
import org.dom4j.Node;
import org.dom4j.tree.AbstractEntity;
import org.dom4j.tree.DefaultEntity;

public class FlyweightEntity
extends AbstractEntity {
    protected String name;
    protected String text;

    protected FlyweightEntity() {
    }

    public FlyweightEntity(String string2) {
        this.name = string2;
    }

    public FlyweightEntity(String string2, String string3) {
        this.name = string2;
        this.text = string3;
    }

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

    @Override
    public String getName() {
        return this.name;
    }

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

    @Override
    public void setText(String string2) {
        if (this.text != null) {
            this.text = string2;
            return;
        }
        throw new UnsupportedOperationException("This Entity is read-only. It cannot be modified");
    }
}

