/** * This implementation creates an instance of * {@link org.graphstream.graph#DepthFirstIterator} and returns it. * * @see org.graphstream.graph.Node#getDepthFirstIterator(boolean) */ public <T extends Node> Iterator<T> getDepthFirstIterator(boolean directed) { // XXX change it when the old iterator disappears // XXX change the return type to have access to the other methods return new DepthFirstIterator<T>(this, directed); }
@SuppressWarnings("unchecked") public T next() { if (next == null) throw new NoSuchElementException(); iterator[next.getIndex()] = directed ? next.getLeavingEdgeIterator() : next.getEnteringEdgeIterator(); Node previous = next; gotoNext(); return (T) previous; }
@SuppressWarnings("unchecked") public T next() { if (next == null) throw new NoSuchElementException(); iterator[next.getIndex()] = directed ? next.getLeavingEdgeIterator() : next.getEnteringEdgeIterator(); Node previous = next; gotoNext(); return (T) previous; }
/** * This implementation creates an instance of * {@link org.graphstream.graph#DepthFirstIterator} and returns it. * * @see org.graphstream.graph.Node#getDepthFirstIterator() */ public <T extends Node> Iterator<T> getDepthFirstIterator() { // XXX change it when the old iterator disappears // XXX change the return type to have access to the other methods return new DepthFirstIterator<T>(this); }
/** * This implementation creates an instance of * {@link org.graphstream.graph#DepthFirstIterator} and returns it. * * @see org.graphstream.graph.Node#getDepthFirstIterator(boolean) */ public <T extends Node> Iterator<T> getDepthFirstIterator(boolean directed) { // XXX change it when the old iterator disappears // XXX change the return type to have access to the other methods return new DepthFirstIterator<T>(this, directed); }
/** * This implementation creates an instance of * {@link org.graphstream.graph#DepthFirstIterator} and returns it. * * @see org.graphstream.graph.Node#getDepthFirstIterator() */ public <T extends Node> Iterator<T> getDepthFirstIterator() { // XXX change it when the old iterator disappears // XXX change the return type to have access to the other methods return new DepthFirstIterator<T>(this); }