"Backward"-Iterator - Beginners question

U

Ulrich Goebel

Hallo,

I'm locking for an "iterator" type with not only the .next() method, but
with a .previous(), .first() and .last() method, so that I can through
it from the beginning or from the end, and in both directions, even
alternately (for example two steps forward, one backward, two steps
forward).

Any help will be wellcome!

Ulrich
 
B

Bernd Nawothnig

I'm locking for an "iterator" type with not only the .next() method, but
with a .previous(), .first() and .last() method, so that I can through
it from the beginning or from the end, and in both directions, even
alternately (for example two steps forward, one backward, two steps
forward).

Simply write a class with these methods. Where is the problem?




Bernd
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top