class deque_iterator #( type T = int ) extends iterator#( T )
Provides an iterator to a deque.
| T | optional The type of data collected in a deque. The default is int. |
| deque_iterator | Provides an iterator to a deque. |
| Types | |
| deque_type | The shorthand of the deque type of type T. |
| Functions | |
| new | Creates a deque iterator. |
| has_next | virtual Returns 1 if the iterator has more elements. |
| next | virtual Returns the next element. |
| remove | virtual Removes the last element returned by the iterator. |
typedef deque#( T ) deque_type
The shorthand of the deque type of type T.
virtual function void remove()
virtual Removes the last element returned by the iterator. This function can be called once per call to next.
None.
Provides an iterator to a deque.
class deque_iterator #( type T = int ) extends iterator#( T )
Implements a double-ended queue using a queue.
class deque #( type T = int ) extends collection#( T )
The shorthand of the deque type of type T.
typedef deque#( T ) deque_type
Creates a deque iterator.
function new( deque_type dq )
virtual Returns 1 if the iterator has more elements.
virtual function bit has_next()
virtual Returns the next element.
virtual function T next()
virtual Removes the last element returned by the iterator.
virtual function void remove()