cc.mallet.pipe.iterator
Class PatternMatchIterator

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

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

Iterates over matching regular expresions. E.g. regexp = Pattern.compile ("

(.+?)

") will extract

elements from:

This block is an element

this is not

but this is


Constructor Summary
PatternMatchIterator(java.lang.CharSequence input, java.util.regex.Pattern regexp)
           
 
Method Summary
 java.lang.String getNextElement()
           
 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

PatternMatchIterator

public PatternMatchIterator(java.lang.CharSequence input,
                            java.util.regex.Pattern regexp)
Method Detail

getNextElement

public java.lang.String getNextElement()

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>