com.hp.hpl.jena.util.iterator
Class LateBindingIterator

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

public abstract class LateBindingIterator
extends Object
implements Iterator

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: $' Revision='$Revision: 1.2 $' Date='$Date: 2003/08/27 13:07:54 $'
Author:
jjc

Constructor Summary
LateBindingIterator()
          An Iterator that is created lazily.
 
Method Summary
abstract  Iterator create()
          The subclass must define this to return the Iterator to invoke.
 boolean hasNext()
           
 Object 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 Iterator

next

public Object next()
Specified by:
next in interface Iterator

remove

public void remove()
Specified by:
remove in interface Iterator

create

public abstract Iterator 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 Hewlett-Packard Development Company, LP