marf.Stats
Class WordStats

java.lang.Object
  extended by marf.Stats.StatisticalObject
      extended by marf.Stats.WordStats
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable
Direct Known Subclasses:
Observation

public class WordStats
extends StatisticalObject

A pure container for statistics of a word --- no business logic.

$Id: WordStats.java,v 1.21 2007/12/18 21:57:15 mokhov Exp $

Since:
0.3.0.2
Version:
$Revision: 1.21 $
Author:
Serguei Mokhov
See Also:
Serialized Form

Field Summary
 
Fields inherited from class marf.Stats.StatisticalObject
iFrequency, iRank
 
Constructor Summary
WordStats()
          Constructs the default object with an empty lexeme.
WordStats(int piFrequency)
          Constructs object with the desired frequency.
WordStats(int piFrequency, java.lang.String pstrLexeme)
          Constructs object with the desired frequency and the lexeme.
WordStats(WordStats poWordStats)
          Copy-constructor.
 
Method Summary
 java.lang.Object clone()
          Implements Cloneable interface for the WordStats object.
 java.lang.String getLexeme()
          Retrieves the lexeme of the object.
static java.lang.String getMARFSourceCodeRevision()
          Returns source code revision information.
 java.lang.String toString()
          Reports lexeme, frequency, and rank of an occurrence of a word.
 
Methods inherited from class marf.Stats.StatisticalObject
equals, getFrequency, getRank, hashCode, incFrequency, incRank, setRank
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WordStats

public WordStats()
Constructs the default object with an empty lexeme.


WordStats

public WordStats(int piFrequency,
                 java.lang.String pstrLexeme)
Constructs object with the desired frequency and the lexeme.

Parameters:
piFrequency - the frequency
pstrLexeme - the lexeme

WordStats

public WordStats(int piFrequency)
Constructs object with the desired frequency.

Parameters:
piFrequency - the frequency

WordStats

public WordStats(WordStats poWordStats)
Copy-constructor.

Parameters:
poWordStats - WordStats object to copy properties from
Since:
0.3.0.5
Method Detail

getLexeme

public final java.lang.String getLexeme()
Retrieves the lexeme of the object.

Returns:
the current lexeme

toString

public java.lang.String toString()
Reports lexeme, frequency, and rank of an occurrence of a word.

Overrides:
toString in class StatisticalObject
Since:
0.3.0.5
See Also:
Object.toString()

clone

public java.lang.Object clone()
Implements Cloneable interface for the WordStats object.

Overrides:
clone in class StatisticalObject
Since:
0.3.0.5
See Also:
Object.clone()

getMARFSourceCodeRevision

public static java.lang.String getMARFSourceCodeRevision()
Returns source code revision information.

Returns:
revision string


SourceForge Logo