coins.alias.util
インタフェース 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.


メソッドの概要
 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.
 

メソッドの詳細

hasNext

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

戻り値:
true if there are more elements.

next

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

戻り値:
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.