1 package org.apache.lucene.search; 2 3 18 19 22 public class SimilarityDelegator extends Similarity { 23 24 private Similarity delegee; 25 26 30 public SimilarityDelegator(Similarity delegee) { 31 this.delegee = delegee; 32 } 33 34 public float lengthNorm(String fieldName, int numTerms) { 35 return delegee.lengthNorm(fieldName, numTerms); 36 } 37 38 public float queryNorm(float sumOfSquaredWeights) { 39 return delegee.queryNorm(sumOfSquaredWeights); 40 } 41 42 public float tf(float freq) { 43 return delegee.tf(freq); 44 } 45 46 public float sloppyFreq(int distance) { 47 return delegee.sloppyFreq(distance); 48 } 49 50 public float idf(int docFreq, int numDocs) { 51 return delegee.idf(docFreq, numDocs); 52 } 53 54 public float coord(int overlap, int maxOverlap) { 55 return delegee.coord(overlap, maxOverlap); 56 } 57 58 } 59 | Popular Tags |