freemarker.ext.jdom
Class NodeListIterator

java.lang.Object
  extended by freemarker.ext.jdom.NodeListIterator
All Implemented Interfaces:
TemplateIteratorModel, TemplateModel

public class NodeListIterator
extends java.lang.Object
implements TemplateIteratorModel

Iterator model for NodeListModel. This implements a thread-safe iterator over JDOM lists.

Since:
1.8
Version:
$Id: NodeListIterator.java 1159 2013-04-20 05:53:37Z run2000 $

Method Summary
 boolean hasNext()
          Returns true if nodes can be returned by a call to next().
 boolean isEmpty()
          Is the object empty?
 TemplateModel next()
          Returns the next node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

hasNext

public boolean hasNext()
Returns true if nodes can be returned by a call to next().

Specified by:
hasNext in interface TemplateIteratorModel
Returns:
true if there are more items to be iterated over, otherwise false

next

public TemplateModel next()
Returns the next node.

Specified by:
next in interface TemplateIteratorModel
Returns:
the next item in the list

isEmpty

public boolean isEmpty()
                throws TemplateModelException
Is the object empty?

Specified by:
isEmpty in interface TemplateModel
Returns:
true if this object is empty, otherwise false
Throws:
TemplateModelException