coins.alias.util
Interface Scanner


public interface Scanner

Scans a set of integers (ints). An imaginary cursor that advances its position with each call to next is used to identify the current position. The behavior is undefined if the underlying set is modified (in any way except the delete method of this Scanner) while scanning.


Method Summary
 void delete()
          Deletes the element returned by the last call to next.
 boolean hasNext()
          Returns true if there are more elements.
 int next()
          Returns the next element and advances the cursor by one.
 

Method Detail

hasNext

public boolean hasNext()
Returns true if there are more elements.

Returns:
true if there are more elements.

next

public int next()
Returns the next element and advances the cursor by one.

Returns:
the next element.

delete

public void delete()
Deletes the element returned by the last call to next. The object the cursor points to is unchanged.