com.hp.hpl.mesa.rdf.jena.common.prettywriter
Class LateBindingIterator

java.lang.Object
  |
  +--com.hp.hpl.mesa.rdf.jena.common.prettywriter.LateBindingIterator
All Implemented Interfaces:
java.util.Iterator

public abstract class LateBindingIterator
extends java.lang.Object
implements java.util.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: 2001/07/04 17:54:02 $'
Author:
jjc

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

next

public java.lang.Object next()
Specified by:
next in interface java.util.Iterator

remove

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

create

public abstract java.util.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 © 2001 Hewlett-Packard. All Rights Reserved.