Checking if the iterator has more items

  1. Add the existing it variable to the While true figure.
  2. Click the Java™... icon on the palette. The Select a Java Visual Snippet window opens.
  3. In the Specify a type (? = any character, * = any String) field, type java.util.Iterator.
  4. Click Iterator.
  5. Click java.util - WSInstallDir/runtimes/bi_v6_stub/java/jre/lib/core.jar.
  6. Click hasNext().
  7. Click OK.
  8. Add the hasNext activity to the While true figure.
  9. Click the Expression icon on the palette.
  10. Add the expression to the While true figure and label it hasMoreSymbols.
  11. Connect the it figure to the hasNext figure.
  12. Connect the hasNext figure to the hasMoreSymbols figure.

Feedback
(C) Copyright IBM Corporation 2005. All Rights Reserved.