|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.common.collect.UnmodifiableIterator<T>
com.google.common.collect.AbstractIterator<java.lang.String>
edu.washington.cs.knowitall.io.TextBlockIterator
public class TextBlockIterator
Buffers text "blocks" from a source of strings and iterates over the blocks. By default, a newline is used to separate blocks, but a custom value can be set.
Constructor Summary | |
---|---|
TextBlockIterator(java.io.BufferedReader reader)
Constructs a TextBlockIterator using a newline as the default break. |
|
TextBlockIterator(java.io.BufferedReader reader,
java.lang.String blockBreak)
|
|
TextBlockIterator(java.lang.Iterable<java.lang.String> iter)
Constructs a TextBlockIterator over the strings returned by iter , using the
default block break. |
|
TextBlockIterator(java.lang.Iterable<java.lang.String> iter,
java.lang.String blockBreak)
Constructs a TextBlockIterator over the strings returned by iter . |
|
TextBlockIterator(java.util.Iterator<java.lang.String> lineIter)
Constructs a TextBlockIterator over the strings returned by lineIter ,
using the default block break. |
|
TextBlockIterator(java.util.Iterator<java.lang.String> lineIter,
java.lang.String blockBreak)
Constructs a TextBlockIterator over the strings returned by lineIter . |
Method Summary | |
---|---|
protected java.lang.String |
computeNext()
|
Methods inherited from class com.google.common.collect.AbstractIterator |
---|
endOfData, hasNext, next, peek |
Methods inherited from class com.google.common.collect.UnmodifiableIterator |
---|
remove |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TextBlockIterator(java.io.BufferedReader reader, java.lang.String blockBreak)
reader
- the reader to extract blocks from.blockBreak
- the value that represents a block break.public TextBlockIterator(java.io.BufferedReader reader)
TextBlockIterator
using a newline as the default break.
reader
- the reader to extract blocks from.public TextBlockIterator(java.util.Iterator<java.lang.String> lineIter, java.lang.String blockBreak)
TextBlockIterator
over the strings returned by lineIter
.
lineIter
- blockBreak
- public TextBlockIterator(java.util.Iterator<java.lang.String> lineIter)
TextBlockIterator
over the strings returned by lineIter
,
using the default block break.
lineIter
- public TextBlockIterator(java.lang.Iterable<java.lang.String> iter, java.lang.String blockBreak)
TextBlockIterator
over the strings returned by iter
.
iter
- blockBreak
- public TextBlockIterator(java.lang.Iterable<java.lang.String> iter)
TextBlockIterator
over the strings returned by iter
, using the
default block break.
iter
- Method Detail |
---|
protected java.lang.String computeNext()
computeNext
in class com.google.common.collect.AbstractIterator<java.lang.String>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |