edu.stanford.nlp.objectbank
Class DelimitRegExIterator

java.lang.Object
  extended by edu.stanford.nlp.util.AbstractIterator
      extended by edu.stanford.nlp.objectbank.DelimitRegExIterator
All Implemented Interfaces:
Iterator

public class DelimitRegExIterator
extends AbstractIterator

An Iterator that reads the contents of a buffer, delimited by the specified delimiter, and then be subsequently processed by an Function to produce Objects.

Author:
Jenny Finkel
Nested Class Summary
static class DelimitRegExIterator.DelimitRegExIteratorFactory
           
 
Constructor Summary
DelimitRegExIterator(Reader in, String delimiter)
           
DelimitRegExIterator(Reader r, String delimiter, Function op)
           
 
Method Summary
static IteratorFromReaderFactory getFactory(String delim)
          Returns a factory that vends DelimitRegExIterators that reads the contents of the given Reader, splits on the specified delimiter, then returns the result.
static IteratorFromReaderFactory getFactory(String delim, boolean eolIsSignificant)
          Returns a factory that vends DelimitRegExIterators that reads the contents of the given Reader, splits on the specified delimiter, then returns the result.
static IteratorFromReaderFactory getFactory(String delim, Function op)
          Returns a factory that vends DelimitRegExIterators that reads the contents of the given Reader, splits on the specified delimiter, applies op, then returns the result.
static IteratorFromReaderFactory getFactory(String delim, Function op, boolean eolIsSignificant)
          Returns a factory that vends DelimitRegExIterators that reads the contents of the given Reader, splits on the specified delimiter, applies op, then returns the result.
 boolean hasNext()
           
static void main(String[] args)
           
 Object next()
           
protected  Object parseString(String s)
           
 Object peek()
           
 
Methods inherited from class edu.stanford.nlp.util.AbstractIterator
remove
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DelimitRegExIterator

public DelimitRegExIterator(Reader in,
                            String delimiter)

DelimitRegExIterator

public DelimitRegExIterator(Reader r,
                            String delimiter,
                            Function op)
Method Detail

parseString

protected Object parseString(String s)

hasNext

public boolean hasNext()
Specified by:
hasNext in interface Iterator
Specified by:
hasNext in class AbstractIterator

next

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

peek

public Object peek()

getFactory

public static IteratorFromReaderFactory getFactory(String delim)
Returns a factory that vends DelimitRegExIterators that reads the contents of the given Reader, splits on the specified delimiter, then returns the result.


getFactory

public static IteratorFromReaderFactory getFactory(String delim,
                                                   boolean eolIsSignificant)
Returns a factory that vends DelimitRegExIterators that reads the contents of the given Reader, splits on the specified delimiter, then returns the result.


getFactory

public static IteratorFromReaderFactory getFactory(String delim,
                                                   Function op)
Returns a factory that vends DelimitRegExIterators that reads the contents of the given Reader, splits on the specified delimiter, applies op, then returns the result.


getFactory

public static IteratorFromReaderFactory getFactory(String delim,
                                                   Function op,
                                                   boolean eolIsSignificant)
Returns a factory that vends DelimitRegExIterators that reads the contents of the given Reader, splits on the specified delimiter, applies op, then returns the result.


main

public static void main(String[] args)


Stanford NLP Group