Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

LUCENE-3555: these methods should be final, its just a value class

Robert Muir8aaf811751fb
diff --git a/lucene/src/java/org/apache/lucene/search/CollectionStatistics.java b/lucene/src/java/org/apache/lucene/search/CollectionStatistics.java
index 02b1e6c4322..624e7ad1489 100644
--- a/lucene/src/java/org/apache/lucene/search/CollectionStatistics.java
+++ b/lucene/src/java/org/apache/lucene/search/CollectionStatistics.java
@@ -40,33 +40,33 @@ public class CollectionStatistics {
}
/** returns the field name */
- public String field() {
+ public final String field() {
return field;
}
/** returns the total number of documents, regardless of
* whether they all contain values for this field.
* @see IndexReader#maxDoc() */
- public int maxDoc() {
+ public final int maxDoc() {
return maxDoc;
}
/** returns the total number of documents that
* have at least one term for this field.
* @see Terms#getDocCount() */
- public int docCount() {
+ public final int docCount() {
return docCount;
}
/** returns the total number of tokens for this field
* @see Terms#getSumTotalTermFreq() */
- public long sumTotalTermFreq() {
+ public final long sumTotalTermFreq() {
return sumTotalTermFreq;
}
/** returns the total number of postings for this field
* @see Terms#getSumDocFreq() */
- public long sumDocFreq() {
+ public final long sumDocFreq() {
return sumDocFreq;
}
}
diff --git a/lucene/src/java/org/apache/lucene/search/TermStatistics.java b/lucene/src/java/org/apache/lucene/search/TermStatistics.java
index 8a532372a8c..9565f2de4c9 100644
--- a/lucene/src/java/org/apache/lucene/search/TermStatistics.java
+++ b/lucene/src/java/org/apache/lucene/search/TermStatistics.java
@@ -35,19 +35,19 @@ public class TermStatistics {
}
/** returns the term text */
- public BytesRef term() {
+ public final BytesRef term() {
return term;
}
/** returns the number of documents this term occurs in
* @see IndexReader#docFreq(String, BytesRef) */
- public int docFreq() {
+ public final int docFreq() {
return docFreq;
}
/** returns the total number of occurrences of this term
* @see IndexReader#totalTermFreq(String, BytesRef) */
- public long totalTermFreq() {
+ public final long totalTermFreq() {
return totalTermFreq;
}
}