|
JAPI 0_6-alpha-2 Yet another Java API API Documentation |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.japi.xml.NodeListIterator<T>
public class NodeListIterator<T extends Node>
A combined iterable / iterator implementation for iterating over NodeLists.
| Constructor Summary | |
|---|---|
NodeListIterator(Element item,
short nodeType)
Create a NodeListIterator. |
|
NodeListIterator(Element item,
String childName)
Create a NodeListIterator. |
|
NodeListIterator(NodeList nodeList)
Create a NodeListIterator. |
|
NodeListIterator(XPath xpath,
Element item,
String expression)
Create a NodeListIterator. |
|
| Method Summary | |
|---|---|
static Element |
getFirstChild(Element el,
String childName)
Convenience helper method for getting the first child of an element that is an element with a specific name. |
boolean |
hasNext()
|
Iterator<T> |
iterator()
|
T |
next()
|
void |
remove()
|
int |
size()
Get the number of elements this iterator would iterate over all. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public NodeListIterator(NodeList nodeList)
nodeList - NodeList to iterate over
public NodeListIterator(Element item,
short nodeType)
item - Element to evaluate againstnodeType - node type of children
public NodeListIterator(Element item,
String childName)
item - Element to evaluate againstchildName - name of child element
public NodeListIterator(XPath xpath,
Element item,
String expression)
throws XPathExpressionException
xpath - XPath to evaulate againstitem - Object to evaluate againstexpression - XPath expression to evaluate
XPathExpressionException - in case of xpath errors| Method Detail |
|---|
public static Element getFirstChild(Element el,
String childName)
el - element to get child ofchildName - name of child element to get
null if no such child elementpublic Iterator<T> iterator()
iterator in interface Iterable<T extends Node>public boolean hasNext()
hasNext in interface Iterator<T extends Node>
public T next()
throws NoSuchElementException
next in interface Iterator<T extends Node>NoSuchElementExceptionpublic void remove()
remove in interface Iterator<T extends Node>public int size()
|
JAPI Yet another Java API API Documentation |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||