
org.eclipse.xtext.nodemodel.BidiTreeIterator Maven / Gradle / Ivy
/*******************************************************************************
* Copyright (c) 2010 itemis AG (http://www.itemis.eu) and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*******************************************************************************/
package org.eclipse.xtext.nodemodel;
import java.util.NoSuchElementException;
import org.eclipse.emf.common.util.TreeIterator;
/**
* A {@link BidiIterator bidirectional} {@link TreeIterator tree iterator}.
* It can be used in both directions and even alternating.
* @author Sebastian Zarnekow - Initial contribution and API
*/
public interface BidiTreeIterator extends TreeIterator, BidiIterator {
/**
* {@inheritDoc}
*
* Intermixed calls to {@link #next()} and {@link #previous()} may not lead
* to the very same element since the iterator does not return the parent element
* when its done with its children but the next sibling of the parent.
*
* @exception NoSuchElementException iteration has no next element.
*/
T next();
/**
* {@inheritDoc}
*
* Intermixed calls to {@link #next()} and {@link #previous()} may not lead
* to the very same element since the iterator does not return the parent element
* when its done with its children but the next sibling of the parent.
*
* @exception NoSuchElementException iteration has no previous element.
*/
T previous();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy