Merge git+ssh://davetron5000@repo.or.cz/srv/git/vimdoclet
[vimdoclet.git] / sample / java.util.Iterator.txt
blobce34fc6714ba5f842b7349df2f8f852293d452d6
1 *java.util.Iterator* *Iterator* An iterator over a collection.
3 public interface interface Iterator
6 |java.util.Iterator_Description|
7 |java.util.Iterator_Fields|
8 |java.util.Iterator_Constructors|
9 |java.util.Iterator_Methods|
11 ================================================================================
13 *java.util.Iterator_Methods*
14 |java.util.Iterator.hasNext()|Returns true if the iteration has more elements.
15 |java.util.Iterator.next()|Returns the next element in the iteration.
16 |java.util.Iterator.remove()|Removes from the underlying collection the last el
18 *java.util.Iterator_Description*
20 An iterator over a collection. Iterator takes the place of Enumeration in the 
21 Java collections framework. Iterators differ from enumerations in two ways: 
22 Iterators allow the caller to remove elements from the underlying collection 
23 during the iteration with well-defined semantics. Method names have been 
24 improved. 
26 This interface is a member of the <a href="/../guide/collections/index.html"> 
27 Java Collections Framework. 
30 *java.util.Iterator.hasNext()*
32 public boolean hasNext()
34 Returns true if the iteration has more elements. (In other words, returns true 
35 if next would return an element rather than throwing an exception.) 
38     Returns: true if the iterator has more elements. 
39 *java.util.Iterator.next()*
41 public |java.lang.Object| next()
43 Returns the next element in the iteration. Calling this method repeatedly until 
44 the (|java.util.Iterator|) method returns false will return each element in the 
45 underlying collection exactly once. 
48     Returns: the next element in the iteration. 
49 *java.util.Iterator.remove()*
51 public void remove()
53 Removes from the underlying collection the last element returned by the 
54 iterator (optional operation). This method can be called only once per call to 
55 next. The behavior of an iterator is unspecified if the underlying collection 
56 is modified while the iteration is in progress in any way other than by calling 
57 this method.