|
||||||||||
| 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<String>
edu.washington.cs.knowitall.io.SmartTextBlockIterator
public class SmartTextBlockIterator
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 | |
|---|---|
SmartTextBlockIterator(BufferedReader reader)
Constructs a TextBlockIterator using a newline as the
default break. |
|
SmartTextBlockIterator(BufferedReader reader,
String blockBreak)
|
|
SmartTextBlockIterator(Iterable<String> iter)
Constructs a TextBlockIterator over the strings returned by
iter, using the default block break. |
|
SmartTextBlockIterator(Iterable<String> iter,
String blockBreak)
Constructs a TextBlockIterator over the strings returned by
iter. |
|
SmartTextBlockIterator(Iterator<String> lineIter)
Constructs a TextBlockIterator over the strings returned by
lineIter, using the default block break. |
|
SmartTextBlockIterator(Iterator<String> lineIter,
String blockBreak)
Constructs a TextBlockIterator over the strings returned by
lineIter. |
|
| Method Summary | |
|---|---|
protected 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 SmartTextBlockIterator(BufferedReader reader,
String blockBreak)
reader - the reader to extract blocks from.blockBreak - the value that represents a block break.public SmartTextBlockIterator(BufferedReader reader)
TextBlockIterator using a newline as the
default break.
reader - the reader to extract blocks from.
public SmartTextBlockIterator(Iterator<String> lineIter,
String blockBreak)
TextBlockIterator over the strings returned by
lineIter.
lineIter - blockBreak - public SmartTextBlockIterator(Iterator<String> lineIter)
TextBlockIterator over the strings returned by
lineIter, using the default block break.
lineIter -
public SmartTextBlockIterator(Iterable<String> iter,
String blockBreak)
TextBlockIterator over the strings returned by
iter.
iter - blockBreak - public SmartTextBlockIterator(Iterable<String> iter)
TextBlockIterator over the strings returned by
iter, using the default block break.
iter - | Method Detail |
|---|
protected String computeNext()
computeNext in class com.google.common.collect.AbstractIterator<String>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||