/*   Copyright 2004 The Apache Software Foundation
 *
 *   Licensed under the Apache License, Version 2.0 (the "License");
 *   you may not use this file except in compliance with the License.
 *   You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 *   Unless required by applicable law or agreed to in writing, software
 *   distributed under the License is distributed on an "AS IS" BASIS,
 *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *   See the License for the specific language governing permissions and
 *  limitations under the License.
 */

package org.apache.xmlbeans.impl.store;

import org.w3c.dom.Comment;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;

import static org.apache.xmlbeans.impl.store.Cur.COMMENT;

class CommentXobj extends NodeXobj implements Comment {
    CommentXobj(Locale l) {
        super(l, COMMENT, DomImpl.COMMENT);
    }

    Xobj newNode(Locale l) {
        return new CommentXobj(l);
    }

    public NodeList getChildNodes() {
        return DomImpl._emptyNodeList;
    }

    public void appendData(String arg) {
        DomImpl._characterData_appendData(this, arg);
    }

    public void deleteData(int offset, int count) {
        DomImpl._characterData_deleteData(this, offset, count);
    }

    public String getData() {
        return DomImpl._characterData_getData(this);
    }

    public int getLength() {
        return DomImpl._characterData_getLength(this);
    }

    public Node getFirstChild() {
        return null;
    }

    public void insertData(int offset, String arg) {
        DomImpl._characterData_insertData(this, offset, arg);
    }

    public void replaceData(int offset, int count, String arg) {
        DomImpl._characterData_replaceData(this, offset, count, arg);
    }

    public void setData(String data) {
        DomImpl._characterData_setData(this, data);
    }

    public String substringData(int offset, int count) {
        return DomImpl._characterData_substringData(this, offset, count);
    }
}

