T - the type of the items on the stackpublic class TopDownStackIterable<T>
extends java.lang.Object
implements java.lang.Iterable<T>
Note: Java stacks natively iterate from bottom to top; C# stacks from top to bottom.
| Constructor and Description |
|---|
TopDownStackIterable(java.util.Stack<T> stack)
Construct a top-down iterable view of a stack
|
| Modifier and Type | Method and Description |
|---|---|
java.util.Iterator<T> |
iterator()
Returns an iterator over elements in the stack, starting at the top of stack and proceeding to the bottom
|
public TopDownStackIterable(java.util.Stack<T> stack)
stack - the stack over which the top-down iterator will iterateCopyright (c) 2004-2022 Saxonica Limited. All rights reserved.