com.sun.labs.minion.indexer.postings
Class OccurrenceImpl

java.lang.Object
  extended by com.sun.labs.minion.indexer.postings.OccurrenceImpl
All Implemented Interfaces:
Occurrence
Direct Known Subclasses:
DocOccurrence, WeightedOccurrence

public class OccurrenceImpl
extends java.lang.Object
implements Occurrence

A class that handles simple, ID only occurrences.


Field Summary
protected  int count
          The frequency of this occurrence.
protected  int id
          The ID of this occurrence.
 
Constructor Summary
OccurrenceImpl()
           
OccurrenceImpl(int id)
           
 
Method Summary
 int getCount()
          Gets the count of occurrences that this occurrence represents.
 int getID()
          Gets the ID of the term in this occurrence.
 void setCount(int count)
          Sets the count of occurrences that this occurrence represents.
 void setID(int id)
          Sets the ID for the term in this occurrence.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

id

protected int id
The ID of this occurrence.


count

protected int count
The frequency of this occurrence.

Constructor Detail

OccurrenceImpl

public OccurrenceImpl()

OccurrenceImpl

public OccurrenceImpl(int id)
Method Detail

getID

public int getID()
Description copied from interface: Occurrence
Gets the ID of the term in this occurrence.

Specified by:
getID in interface Occurrence
Returns:
the ID for the term.

setID

public void setID(int id)
Sets the ID for the term in this occurrence.

Specified by:
setID in interface Occurrence
Parameters:
id - the ID.

getCount

public int getCount()
Gets the count of occurrences that this occurrence represents.

Specified by:
getCount in interface Occurrence
Returns:
the number of occurrences.

setCount

public void setCount(int count)
Sets the count of occurrences that this occurrence represents.

Specified by:
setCount in interface Occurrence
Parameters:
count - the number of occurrences.