Java Reference
In-Depth Information
Iterator<T> Interface
Package: java.util
Ancestor interfaces: none
All the exception classes mentioned are the kind that are not required to be caught in a catch
block or declared in a throws clause.
NoSuchElementException is in the java.util package, which requires an import
statement if your code mentions the NoSuchElementException class. All the other exception
classes mentioned are in the package java.lang and so do not require any import statements.
public boolean hasNext()
Returns true if next() has not yet returned all the elements in the collection; returns
false otherwise.
public T next()
Returns the next element of the collection that produced the iterator.
Throws:
NoSuchElementException if there is no next element.
public void remove() (Optional)
Removes from the collection the last element returned by next .
This method can be called only once per call to next .
Throws:
IllegalStateException if the next method has not yet been called, or the remove method
has already been called after the last call to the next method.
UnsupportedOperationException if the remove operation is not supported by this
Iterator .
JButton
See AbstractButton .
JFrame
Package: javax.swing
Ancestor classes:
Object
|
+--Component
|
+--Container
|
+--Window
|
+--Frame
|
+--JFrame
 
Search WWH ::




Custom Search