uk.ac.man.documentparser.input.util
Class DocumentBuffer

java.lang.Object
  extended by uk.ac.man.documentparser.input.util.DocumentBuffer
All Implemented Interfaces:
java.lang.Iterable<Document>, java.util.Iterator<Document>, DocumentIterator

public class DocumentBuffer
extends java.lang.Object
implements DocumentIterator


Field Summary
private  DocumentIterator documents
           
private  int fetchsize
           
private  boolean hasNext
           
private  java.util.logging.Logger logger
           
private  java.util.LinkedList<Document> retrieved
           
 
Constructor Summary
DocumentBuffer(DocumentIterator documents, int fetchsize, java.util.logging.Logger logger)
           
 
Method Summary
 boolean hasNext()
           
 java.util.Iterator<Document> iterator()
           
 Document next()
           
private  void populateRetrieved()
           
 void remove()
           
 void skip()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

documents

private DocumentIterator documents

retrieved

private java.util.LinkedList<Document> retrieved

fetchsize

private int fetchsize

hasNext

private boolean hasNext

logger

private java.util.logging.Logger logger
Constructor Detail

DocumentBuffer

public DocumentBuffer(DocumentIterator documents,
                      int fetchsize,
                      java.util.logging.Logger logger)
Method Detail

skip

public void skip()
Specified by:
skip in interface DocumentIterator

hasNext

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

next

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

populateRetrieved

private void populateRetrieved()

remove

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

iterator

public java.util.Iterator<Document> iterator()
Specified by:
iterator in interface java.lang.Iterable<Document>