com.hp.hpl.jena.util.iterator
Class LateBindingIterator<T>

java.lang.Object
  extended by com.hp.hpl.jena.util.iterator.LateBindingIterator<T>
All Implemented Interfaces:
java.util.Iterator<T>

public abstract class LateBindingIterator<T>
extends java.lang.Object
implements java.util.Iterator<T>

An Iterator that is created lazily. The sequence to be defined is defined by the subclass's definition of create(). This is only called on the first call to hasNext() or next(). This allows an Iterator to be passed to some other code, while delaying the evaluation of what actually is going to be iterated over.

Version:
Release='$Name: Jena-2_6_4 $' Revision='$Revision: 1.1 $' Date='$Date: 2009/06/29 08:55:49 $'
Author:
jjc

Constructor Summary
LateBindingIterator()
          An Iterator that is created lazily.
 
Method Summary
abstract  java.util.Iterator<? extends T> create()
          The subclass must define this to return the Iterator to invoke.
 boolean hasNext()
           
 T next()
           
 void remove()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LateBindingIterator

public LateBindingIterator()
An Iterator that is created lazily. The sequence to be defined is defined by a subclass's instantiation of create(). This is only called on the first call to hasNext() or next().

Method Detail

hasNext

public boolean hasNext()
Specified by:
hasNext in interface java.util.Iterator<T>

next

public T next()
Specified by:
next in interface java.util.Iterator<T>

remove

public void remove()
Specified by:
remove in interface java.util.Iterator<T>

create

public abstract java.util.Iterator<? extends T> create()
The subclass must define this to return the Iterator to invoke. This method will be called at most once, on the first call to next() or hasNext(). From then on, all calls to this will be passed through to the returned Iterator.

Returns:
The parent iterator defining the sequence.


Copyright ? 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Hewlett-Packard Development Company, LP