|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecttecgraf.javautils.xml.XMLListIterator
ImprovedXMLListIterator
@Deprecated public class XMLListIterator
A classe XMLListIterator implementa um iterador sobre uma lista
de elementos do tipo XMLElementInterface, retornando a cada iteração o
próximo elemento cuja tag é igual à tag especificada no construtor (ou null
caso não existam mais elementos com esta tag). Esta implementação assume que
os objetos são adjacentes na lista.
| Field Summary | |
|---|---|
static String |
ANY
Deprecated. Tag usada para iterar sobre qualquer elemento |
| Constructor Summary | |
|---|---|
XMLListIterator(List<XMLElementInterface> list)
Deprecated. Constrói um iterador sobre qualquer elemento (tag de referência "ANY"). |
|
XMLListIterator(List<XMLElementInterface> list,
String tag)
Deprecated. Constrói um iterador sobre uma lista, buscando por uma tag específica. |
|
| Method Summary | |
|---|---|
String |
getTag()
Deprecated. Retorna a tag de referência para o iterador (o valor que será usado na comparação com os elementos da lista). |
boolean |
hasNext()
Deprecated. Indica se existe mais algum elemento na lista cuja tag seja igual à solicitada. |
XMLElementInterface |
next()
Deprecated. Retorna o próximo elemento com tipo igual ao que vínhamos buscando ou null caso não haja mais elementos deste tipo. |
XMLElementInterface |
next(String _tag)
Deprecated. Obtém o próximo elemento da lista que possui a tag desejada, ou null caso não haja mais elementos com esta tag. Se a tag solicitada é a mesma que vínhamos buscando, simplesmente continuamos a iteração. |
void |
reset()
Deprecated. Reinicializa o iterador, usando a tag ANY como tag de busca. |
void |
reset(String _tag)
Deprecated. Reinicializa o iterador, redefinindo a tag de busca. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String ANY
| Constructor Detail |
|---|
public XMLListIterator(List<XMLElementInterface> list,
String tag)
list - lista de elementostag - tag a ser buscada
IllegalArgumentException - se a lista é nullpublic XMLListIterator(List<XMLElementInterface> list)
list - lista de elementos| Method Detail |
|---|
public void reset(String _tag)
reset in interface XMLListIteratorInterface_tag - nova tag de buscapublic void reset()
reset in interface XMLListIteratorInterfacepublic XMLElementInterface next()
next in interface XMLListIteratorInterfacepublic XMLElementInterface next(String _tag)
next in interface XMLListIteratorInterface_tag - nova tag de busca
public boolean hasNext()
hasNext in interface XMLListIteratorInterfacetrue se o elemento seguinte na lista possui tag
igual à tag de busca, false caso contrário.public String getTag()
getTag in interface XMLListIteratorInterface
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||