TreeNode		node; int				depth; int				current; int				size; Stack			stack; int				index;   if (allowsChildren == false || children.size() == 0) { return 0; }   stack = new Stack();
Stack stack = new Stack();
	public int getDepth() {		// Variables		TreeNode		node;		int				depth;		int				current;		int				size;		Stack			stack;		int				index;		// Check for children		if (allowsChildren == false || children.size() == 0) {			return 0;		} // if		// Process Depths		stack = new Stack();		stack.push(new Integer(0));		node = getChildAt(0);//System.out.println("  * Descend: 0-0");		depth = 0;		current = 1;		while (stack.empty() == false) {			// Check if node has children			if (node.getChildCount() != 0) {				node = node.getChildAt(0);				stack.push(new Integer(0));				current++;//				System.out.println("  * Descend: 0-" + current);			// Check for next sibling			} else {				// Check Depth				if (current > depth) {					depth = current;				} // if				do {					// Traverse to Parent					node = node.getParent();					size = node.getChildCount();					current--;					index = ((Integer) stack.pop()).intValue();//					System.out.println("  * Ascend from: " + index + "-" + current);					index++;				} while (index >= size && node != this);				// Check for child				if (index < size) {					node = node.getChildAt(index);					stack.push(new Integer(index));					current++;//					System.out.println("  * Descend: " + index + "-" + current);				} // if			} // if		} // while		return depth;	} // getDepth()