public class NameSampleCountersStream extends FilterObjectStream<NameSample,NameSample>
Modifier and Type | Method and Description |
---|---|
Map<String,Integer> |
getNameCounters() |
int |
getSentenceCount() |
int |
getTokenCount() |
void |
printSummary() |
NameSample |
read()
Returns the next object.
|
void |
reset()
Repositions the stream at the beginning and the previously seen object sequence
will be repeated exactly.
|
close
public NameSample read() throws IOException
ObjectStream
IOException
- if there is an error during readingpublic void reset() throws IOException, UnsupportedOperationException
ObjectStream
reset
in interface ObjectStream<NameSample>
reset
in class FilterObjectStream<NameSample,NameSample>
IOException
- if there is an error during reseting the streamUnsupportedOperationException
public int getSentenceCount()
public int getTokenCount()
public void printSummary()
Copyright © 2020 The Apache Software Foundation. All rights reserved.