LUCENE-2913: Add missing getters to Numeric* classes

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1069341 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Uwe Schindler 2011-02-10 11:50:37 +00:00
parent ecb292eebb
commit f4e977bb26
5 changed files with 19 additions and 1 deletions

View File

@ -857,6 +857,8 @@ New features
<IDEOGRAPHIC>, <HANGUL>, <KATAKANA>, and <HIRAGANA>.
(Robert Muir, Steven Rowe)
* LUCENE-2913: Add missing getters to Numeric* classes. (Uwe Schindler)
Optimizations
* LUCENE-2494: Use CompletionService in ParallelMultiSearcher instead of

View File

@ -293,6 +293,11 @@ public final class NumericTokenStream extends TokenStream {
return (shift < valSize);
}
/** Returns the precision step. */
public int getPrecisionStep() {
return precisionStep;
}
// members
private final NumericTermAttribute numericAtt = addAttribute(NumericTermAttribute.class);
private final TypeAttribute typeAtt = addAttribute(TypeAttribute.class);

View File

@ -222,6 +222,11 @@ public final class NumericField extends AbstractField {
return (Number) fieldsData;
}
/** Returns the precision step. */
public int getPrecisionStep() {
return numericTS.getPrecisionStep();
}
/**
* Initializes the field with the supplied <code>long</code> value.
* @param value the numeric value

View File

@ -179,4 +179,7 @@ public final class NumericRangeFilter<T extends Number> extends MultiTermQueryWr
/** Returns the upper value of this range filter */
public T getMax() { return query.getMax(); }
/** Returns the precision step. */
public int getPrecisionStep() { return query.getPrecisionStep(); }
}

View File

@ -319,6 +319,9 @@ public final class NumericRangeQuery<T extends Number> extends MultiTermQuery {
/** Returns the upper value of this range query */
public T getMax() { return max; }
/** Returns the precision step. */
public int getPrecisionStep() { return precisionStep; }
@Override
public String toString(final String field) {
final StringBuilder sb = new StringBuilder();