|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object marf.Stats.StatisticalObject
public class StatisticalObject
Generic Statistical Object.
$Id: StatisticalObject.java,v 1.17 2007/12/18 21:57:14 mokhov Exp $
Field Summary | |
---|---|
protected int |
iFrequency
Number of occurrences of this object basic data in a given document (for example a corpus or a WAVE file). |
protected int |
iRank
Rank of the object in the document. |
Constructor Summary | |
---|---|
StatisticalObject()
Constructs a default statistical object. |
|
StatisticalObject(int piFrequency)
Constructs a statistical object with a frequency parameter. |
|
StatisticalObject(StatisticalObject poStatisticalObject)
Copy-constructor. |
Method Summary | |
---|---|
java.lang.Object |
clone()
Implements Cloneable interface for the StatisticalObject. |
boolean |
equals(java.lang.Object poStatisticalObject)
Checks equality of two StatisticalObjects whether the parameter is not null and its toString() 's output
is equal to this one. |
int |
getFrequency()
Retrieves the object's frequency. |
static java.lang.String |
getMARFSourceCodeRevision()
Returns source code revision information. |
int |
getRank()
Retrieves the object's rank. |
int |
hashCode()
Overrides hashCode() since equals() is
overridden by returning the hash code of the toString() . |
int |
incFrequency()
Increments the object frequency by one. |
int |
incRank()
Increments rank of the object by one. |
void |
setRank(int piRank)
Allows setting rank of this object. |
java.lang.String |
toString()
Reports frequency and rank of an occurrence of a statistical object. |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected int iFrequency
0
.
protected int iRank
-1
, i.e. unset.
Constructor Detail |
---|
public StatisticalObject()
public StatisticalObject(int piFrequency)
piFrequency
- the desired frequency of this objectpublic StatisticalObject(StatisticalObject poStatisticalObject)
poStatisticalObject
- statistical object to copy properties ofMethod Detail |
---|
public final void setRank(int piRank)
piRank
- the new rankpublic final int incRank()
public final int getRank()
public final int getFrequency()
public final int incFrequency()
public java.lang.Object clone()
clone
in class java.lang.Object
Object.clone()
public boolean equals(java.lang.Object poStatisticalObject)
toString()
's output
is equal to this one.
equals
in class java.lang.Object
Object.equals(java.lang.Object)
public int hashCode()
hashCode()
since equals()
is
overridden by returning the hash code of the toString()
.
hashCode
in class java.lang.Object
Object.hashCode()
,
equals(Object)
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public static java.lang.String getMARFSourceCodeRevision()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |