JML

org.multijava.launcher
Class Launcher.ToolIterator

java.lang.Object
  extended byorg.multijava.launcher.Launcher.ToolIterator
All Implemented Interfaces:
Iterator, ResettableIterator
Enclosing class:
Launcher

protected static class Launcher.ToolIterator
extends Object
implements ResettableIterator

The Iterator that uses an ArrayList to cycle through Hashtables that hold the tool descriptions and AbstractToolLaunchers to enable the launchers to run the various tools. The Iterator enables these launchers to visually present the tools in the order they were added to the iterator.


Field Summary
(package private)  int currentIndex
           
(package private)  ArrayList tools
           
 
Constructor Summary
Launcher.ToolIterator()
          Constructor for the ToolIterator
 
Method Summary
 void add(Object newItem)
          Adds an element to the iterator
 boolean hasNext()
          Checks to see whether the iterator has a next element.
 int index()
          Returns the current index of the iterator
 Object next()
          Returns the next element in the iterator
 void remove()
          Removes the current element from the iterator
 void reset()
          Resets the iterator back to its initial index
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tools

ArrayList tools

currentIndex

int currentIndex
Constructor Detail

Launcher.ToolIterator

public Launcher.ToolIterator()
Constructor for the ToolIterator

Method Detail

hasNext

public boolean hasNext()
Checks to see whether the iterator has a next element.

Specified by:
hasNext in interface Iterator

next

public Object next()
Returns the next element in the iterator

Specified by:
next in interface Iterator

remove

public void remove()
Removes the current element from the iterator

Specified by:
remove in interface Iterator

add

public void add(Object newItem)
Adds an element to the iterator


index

public int index()
Returns the current index of the iterator


reset

public void reset()
Resets the iterator back to its initial index

Specified by:
reset in interface ResettableIterator

JML

JML is Copyright (C) 1998-2002 by Iowa State University and is distributed under the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This release depends on code from the MultiJava project and is based in part on the Kopi project Copyright (C) 1990-99 DMS Decision Management Systems Ges.m.b.H.