From 8aaf811751fb1c951afc090a80754d18ca03a23e Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Sat, 5 Nov 2011 16:06:20 +0000 Subject: [PATCH] LUCENE-3555: these methods should be final, its just a value class git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1197977 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/lucene/search/CollectionStatistics.java | 10 +++++----- .../java/org/apache/lucene/search/TermStatistics.java | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) 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; } }