/*
 * TreeWrapper.java
 *
 * Created on June 1, 2006, 10:17 AM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package usda.weru.util.diff.table;

import usda.weru.util.diff.DiffNode;

/**
 *
 * @author Joseph Levin
 */
public class TreeWrapper {   
    private final String c_text;
    private final int c_index;
    private final int c_depth;
    private final boolean c_hasChildren;
    /** Creates a new instance of TreeWrapper */

	/**
	 * Creates a new instance of TreeWrapper
	 * @param index
	 * @param node
	 */
	public TreeWrapper(int index, DiffNode node) {
        c_index = index;
        c_text = node.getText();
        c_hasChildren = node.getChildCount() > 0;
        c_depth = node.getDepth();
    }

	/**
	 *
	 * @return
	 */
	public String getText(){
        return c_text;
    }

	/**
	 *
	 * @return
	 */
	public int getIndex(){
        return c_index;
    }

	/**
	 *
	 * @return
	 */
	public boolean hasChildren(){
        return c_hasChildren;
    }

	/**
	 *
	 * @return
	 */
	public int getDepth(){
        return c_depth;
    }

}
