org.deegree.commons.xml
Class FixedChildIterator
java.lang.Object
org.deegree.commons.xml.FixedChildIterator
- All Implemented Interfaces:
- java.lang.Iterable<org.apache.axiom.om.OMElement>, java.util.Iterator<org.apache.axiom.om.OMElement>
public class FixedChildIterator
- extends java.lang.Object
- implements java.lang.Iterable<org.apache.axiom.om.OMElement>, java.util.Iterator<org.apache.axiom.om.OMElement>
This is a child element iterator that expects a fixed number of child elements. It will throw an
XMLParsingException
when an element is missing, or when you access the last expected element and there
are stil child elements left.
- Version:
- $Revision: 18668 $, $Date: 2009-07-23 18:16:40 +0200 (Do, 23. Jul 2009) $
- Author:
- Oliver Tonnhofer, last edited by: $Author: mschneider $
Constructor Summary |
FixedChildIterator(org.apache.axiom.om.OMElement parent,
int expectedChildren)
|
Method Summary |
boolean |
hasNext()
|
java.util.Iterator<org.apache.axiom.om.OMElement> |
iterator()
|
org.apache.axiom.om.OMElement |
next()
|
void |
remove()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FixedChildIterator
public FixedChildIterator(org.apache.axiom.om.OMElement parent,
int expectedChildren)
- Parameters:
parent
- expectedChildren
- the number of expected child elements
next
public org.apache.axiom.om.OMElement next()
- Specified by:
next
in interface java.util.Iterator<org.apache.axiom.om.OMElement>
iterator
public java.util.Iterator<org.apache.axiom.om.OMElement> iterator()
- Specified by:
iterator
in interface java.lang.Iterable<org.apache.axiom.om.OMElement>
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interface java.util.Iterator<org.apache.axiom.om.OMElement>
remove
public void remove()
- Specified by:
remove
in interface java.util.Iterator<org.apache.axiom.om.OMElement>
Copyright © 2011. All Rights Reserved.