org.apache.jackrabbit.webdav.xml
Class ElementIterator

java.lang.Object
  extended by org.apache.jackrabbit.webdav.xml.ElementIterator
All Implemented Interfaces:
Iterator<Element>

public class ElementIterator
extends Object
implements Iterator<Element>

ElementIterator...


Constructor Summary
ElementIterator(Element parent)
          Create a new instance of ElementIterator with the given parent element.
ElementIterator(Element parent, String localName, Namespace namespace)
          Create a new instance of ElementIterator with the given parent element.
 
Method Summary
 boolean hasNext()
          Returns true if there is a next Element
 Element next()
           
 Element nextElement()
          Returns the next Element in the iterator.
 void remove()
          Not implemented
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ElementIterator

public ElementIterator(Element parent,
                       String localName,
                       Namespace namespace)
Create a new instance of ElementIterator with the given parent element. Only child elements that match the given local name and namespace will be respected by hasNext() and nextElement().

Parameters:
parent -
localName - local name the child elements must match
namespace - namespace the child elements must match

ElementIterator

public ElementIterator(Element parent)
Create a new instance of ElementIterator with the given parent element. No filtering is applied to child elements that are iterated.

Parameters:
parent -
Method Detail

remove

public void remove()
Not implemented

Specified by:
remove in interface Iterator<Element>
Throws:
UnsupportedOperationException

hasNext

public boolean hasNext()
Returns true if there is a next Element

Specified by:
hasNext in interface Iterator<Element>
Returns:
true if a next Element is available.

next

public Element next()
Specified by:
next in interface Iterator<Element>
See Also:
Iterator.next(), nextElement()

nextElement

public Element nextElement()
Returns the next Element in the iterator.

Returns:
the next element
Throws:
NoSuchElementException - if there is no next element.


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.