hyspirit.application.indexing
Class TermFreq

java.lang.Object
  extended by hyspirit.application.indexing.TermFreq

public class TermFreq
extends java.lang.Object

Helper class to manage terms and their frequencies.

Author:
Ingo Frommholz <ingo@is.informatik.uni-duisburg.de>

Created on 18-Jul-2005 18:28:18


Constructor Summary
TermFreq(java.lang.String term)
          Creates a new TermFreq object with frequency 1
TermFreq(java.lang.String term, int frequency)
          Creates a new TermFreq object with the given frequency
 
Method Summary
 int frequency()
          Returns the frequency
 void inc()
          Increments the term frequency
 java.lang.String term()
          Returns the term
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TermFreq

public TermFreq(java.lang.String term,
                int frequency)
Creates a new TermFreq object with the given frequency

Parameters:
term - the term
frequency - (initial) term frequency

TermFreq

public TermFreq(java.lang.String term)
Creates a new TermFreq object with frequency 1

Parameters:
term - the term
Method Detail

inc

public void inc()
Increments the term frequency


term

public java.lang.String term()
Returns the term

Returns:
the term

frequency

public int frequency()
Returns the frequency

Returns:
the frequency