|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--lempinen.neatseeker.core.Statistics
Manages the statistical information concerning the repository.
This class provides a persistent storage of the statistical information concerning the index. At the moment, it maintains a counter for
Field Summary | |
protected long |
documentCount
The total number of documents in the index. |
protected java.lang.String |
file
Path to the serialised file. |
protected long |
wordCount
The total number of words in the index. |
Constructor Summary | |
Statistics(java.lang.String f)
Creates an empty Statistics instance with the given file path. |
Method Summary | |
long |
getDocumentCount()
Returns the document count. |
long |
getWordCount()
Returns the word count. |
void |
incrementDocumentCount()
Increments the document counter. |
void |
incrementWordCount(long number)
Increments the word counter with a specified number. |
void |
load()
Reads the statistics from a text file. |
void |
save()
Saves the statistics to a text file. |
java.lang.String |
toString()
Returns a String representation of the Statistics. |
Methods inherited from class java.lang.Object |
|
Field Detail |
protected long documentCount
protected long wordCount
protected java.lang.String file
Constructor Detail |
public Statistics(java.lang.String f)
Method Detail |
public void incrementDocumentCount()
public void incrementWordCount(long number)
public long getDocumentCount()
public long getWordCount()
public void load()
public void save() throws java.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |