@Override public BidiIterable<AbstractNode> reverse() { return new BidiIterable<AbstractNode>() { @Override public BidiIterator<AbstractNode> iterator() { BidiIterator<AbstractNode> delegate = BasicNodeIterable.this.iterator(); return new ReversedBidiIterator<AbstractNode>(delegate); } @Override public BidiIterable<AbstractNode> reverse() { return BasicNodeIterable.this; } }; }
@Override public BidiIterable<INode> getChildren() { if (hasChildren()) { INode firstChild = getFirstChild(); if (firstChild.hasSiblings()) { return new NodeIterable(firstChild); } else { return SingletonBidiIterable.<INode>create(firstChild); } } return EmptyBidiIterable.instance(); }
public BidiIterable<AbstractNode> basicGetChildren() { if (firstChild != null) { if (firstChild.hasSiblings()) { return new BasicNodeIterable(firstChild); } else { return SingletonBidiIterable.create(basicGetFirstChild()); } } return EmptyBidiIterable.instance(); }
@Override public BidiIterable<INode> reverse() { return new ReversedBidiIterable<INode>(this); }
@Override public BidiIterable<T> reverse() { return this; }
public ReversedBidiIterable(BidiIterable<T> delegate) { this.delegate = delegate; }
@Override public BidiIterable<T> reverse() { return delegate; }
protected BidiIterable<T> getDelegate() { return delegate; }
@Override public BidiIterable<T> reverse() { return null; }
/** {@inheritDoc} */ @Override public BidiIterable<INode> getChildren() { initializeDelegateNode(); return delegateNode.getChildren(); }