cc.mallet.pipe.iterator
Class ParenGroupIterator

java.lang.Object
  extended by cc.mallet.pipe.iterator.ParenGroupIterator
All Implemented Interfaces:
java.util.Iterator<Instance>

public class ParenGroupIterator
extends java.lang.Object
implements java.util.Iterator<Instance>

Iterator that takes a Reader, breaks up the input into top-level parenthesized expressions. For example, in the input (a (a b) c) f (d e), there are two top-level expressions '(a (a b) c)' and '(d e)'. Text that is not within parentheses is ignored. Created: Thu Feb 26 13:45:43 2004

Version:
$Id: ParenGroupIterator.java,v 1.1 2007/10/22 21:37:49 mccallum Exp $
Author:
Charles Sutton

Constructor Summary
ParenGroupIterator(java.io.Reader input)
           
ParenGroupIterator(java.io.Reader input, char openParen, char closeParen)
           
 
Method Summary
 boolean hasNext()
           
 Instance next()
           
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParenGroupIterator

public ParenGroupIterator(java.io.Reader input)

ParenGroupIterator

public ParenGroupIterator(java.io.Reader input,
                          char openParen,
                          char closeParen)
Method Detail

next

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

hasNext

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

remove

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