001 /**
002 * <copyright>
003 *
004 * Copyright (c) 2002-2006 IBM Corporation and others.
005 * All rights reserved. This program and the accompanying materials
006 * are made available under the terms of the Eclipse Public License v1.0
007 * which accompanies this distribution, and is available at
008 * http://www.eclipse.org/legal/epl-v10.html
009 *
010 * Contributors:
011 * IBM - Initial API and implementation
012 *
013 * </copyright>
014 *
015 * $Id: TreeIterator.java,v 1.4 2007/06/12 20:56:17 emerks Exp $
016 */
017 package org.eclipse.emf.common.util;
018
019
020 import java.util.Iterator;
021
022
023 /**
024 * A mechanism for iterating over all the nodes of a tree;
025 * it provides the capability to {@link #prune prune} the iteration so that all descendants of a particular node are skipped.
026 */
027 public interface TreeIterator<E> extends Iterator<E>
028 {
029 /**
030 * Prunes the iterator so that it skips over all the nodes below the most recent result of calling {@link #next() next()}.
031 */
032 void prune();
033 }