Package org.apache.lucene.codecs
Record Class TermStats
java.lang.Object
java.lang.Record
org.apache.lucene.codecs.TermStats
- Record Components:
docFreq- How many documents have at least one occurrence of this term.totalTermFreq- Total number of times this term occurs across all documents in the field.
Holder for per-term statistics.
-
Constructor Summary
ConstructorsConstructorDescriptionTermStats(int docFreq, long totalTermFreq) Creates an instance of aTermStatsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintdocFreq()Returns the value of thedocFreqrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.longReturns the value of thetotalTermFreqrecord component.
-
Constructor Details
-
TermStats
public TermStats(int docFreq, long totalTermFreq) Creates an instance of aTermStatsrecord class.- Parameters:
docFreq- the value for thedocFreqrecord componenttotalTermFreq- the value for thetotalTermFreqrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='. -
docFreq
public int docFreq()Returns the value of thedocFreqrecord component.- Returns:
- the value of the
docFreqrecord component
-
totalTermFreq
public long totalTermFreq()Returns the value of thetotalTermFreqrecord component.- Returns:
- the value of the
totalTermFreqrecord component
-