Win a copy of Java by Comparison (eBook) this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Iterator<String> problem  RSS feed

Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I have a client calling code like this:

Requirement - Return a single Iterator<String> that chains together the array of Iterator<String>s in the order that
they are provided, but skips {@code null} values.

actual method implmentation of iterateStrings

How do I copy the stringIterators to a LIst. I thought of doing that, then in a for loop, removing the null values and returning the Iterator<String>..Please advice.
It would give a normal human mental abilities to rival mine. To think it is just a tiny ad:
Thread Boost - a very different sort of advertising
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!