Please note that this translation of the specification is the result of a java.net community project ( https://jdk5-api-pt-br.dev.java.net/ ). The official version of the specification is the US English language version which can be found at http://java.sun.com/j2se/1.5.0/docs/api/. In case of disputes, the authoritative version of the specification is the original, English document.
|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Iterator<E>
Um iterador sobre uma coleção. Iterator substitui Enumaration no Java collections framework. Iterators são diferentes de enumerations de duas maneiras:
Esta interface é um membro do Java Collections Framework.
Collection,
ListIterator,
Enumeration| Method Summary | |
|---|---|
boolean |
hasNext()
Retorna true se a iteração tiver mais elementos. |
E |
next()
Retorna o próximo elemento na iteração. |
void |
remove()
Remove da coleção de suporte o último elemento retornado pelo iterator (operação opcional). |
| Method Detail |
|---|
boolean hasNext()
E next()
hasNext() retorne false
deve retornar cada elemento na coleção de suporte por vez.
NoSuchElementException - iteração não possui mais elementos.void remove()
UnsupportedOperationException - se a operação remove
não for suportada por este Iterator.
IllegalStateException - se o método next ainda não foi
chamado, ou o método remove já foi chamado
depois da última chamada ao método next.
|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Copyright 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.
Copyright 2006 Sun Microsystems, Inc. Todos os direitos reservados. O uso está sujeito aos termos da licensa.