More javadocs about exclusive bounds.

This commit is contained in:
Adrien Grand 2016-03-17 16:25:05 +01:00
parent d968575b8b
commit c33e8b1e21
4 changed files with 21 additions and 9 deletions

View File

@ -172,7 +172,9 @@ public final class DoublePoint extends Field {
* {@link #newRangeQuery(String, double[], double[])} instead.
* <p>
* You can have half-open ranges (which are in fact &lt;/&le; or &gt;/&ge; queries)
* by setting {@code lowerValue = Double.NEGATIVE_INFINITY} or {@code upperValue = Double.POSITIVE_INFINITY}.
* by setting {@code lowerValue = Double.NEGATIVE_INFINITY} or {@code upperValue = Double.POSITIVE_INFINITY}.
* <p> Ranges are inclusive. For exclusive ranges, pass {@code Math#nextUp(lowerValue)}
* or {@code Math.nextDown(upperValue)}.
* <p>
* Range comparisons are consistent with {@link Double#compareTo(Double)}.
*
@ -190,7 +192,9 @@ public final class DoublePoint extends Field {
* Create a range query for n-dimensional double values.
* <p>
* You can have half-open ranges (which are in fact &lt;/&le; or &gt;/&ge; queries)
* by setting {@code lowerValue[i] = Double.NEGATIVE_INFINITY} or {@code upperValue[i] = Double.POSITIVE_INFINITY}.
* by setting {@code lowerValue[i] = Double.NEGATIVE_INFINITY} or {@code upperValue[i] = Double.POSITIVE_INFINITY}.
* <p> Ranges are inclusive. For exclusive ranges, pass {@code Math#nextUp(lowerValue[i])}
* or {@code Math.nextDown(upperValue[i])}.
* <p>
* Range comparisons are consistent with {@link Double#compareTo(Double)}.
*

View File

@ -172,7 +172,9 @@ public final class FloatPoint extends Field {
* {@link #newRangeQuery(String, float[], float[])} instead.
* <p>
* You can have half-open ranges (which are in fact &lt;/&le; or &gt;/&ge; queries)
* by setting {@code lowerValue = Float.NEGATIVE_INFINITY} or {@code upperValue = Float.POSITIVE_INFINITY}.
* by setting {@code lowerValue = Float.NEGATIVE_INFINITY} or {@code upperValue = Float.POSITIVE_INFINITY}.
* <p> Ranges are inclusive. For exclusive ranges, pass {@code Math#nextUp(lowerValue)}
* or {@code Math.nextDown(upperValue)}.
* <p>
* Range comparisons are consistent with {@link Float#compareTo(Float)}.
*
@ -190,7 +192,9 @@ public final class FloatPoint extends Field {
* Create a range query for n-dimensional float values.
* <p>
* You can have half-open ranges (which are in fact &lt;/&le; or &gt;/&ge; queries)
* by setting {@code lowerValue[i] = Float.NEGATIVE_INFINITY} or {@code upperValue[i] = Float.POSITIVE_INFINITY}.
* by setting {@code lowerValue[i] = Float.NEGATIVE_INFINITY} or {@code upperValue[i] = Float.POSITIVE_INFINITY}.
* <p> Ranges are inclusive. For exclusive ranges, pass {@code Math#nextUp(lowerValue[i])}
* or {@code Math.nextDown(upperValue[i])}.
* <p>
* Range comparisons are consistent with {@link Float#compareTo(Float)}.
*

View File

@ -172,9 +172,10 @@ public final class IntPoint extends Field {
* {@link #newRangeQuery(String, int[], int[])} instead.
* <p>
* You can have half-open ranges (which are in fact &lt;/&le; or &gt;/&ge; queries)
* by setting {@code lowerValue = Integer.MIN_VALUE} or {@code upperValue = Integer.MAX_VALUE}.
* by setting {@code lowerValue = Integer.MIN_VALUE} or {@code upperValue = Integer.MAX_VALUE}.
* <p>
* Ranges are inclusive. For exclusive ranges, pass {@code lowerValue + 1} or {@code upperValue - 1}
* Ranges are inclusive. For exclusive ranges, pass {@code Math.addExact(lowerValue, 1)}
* or {@code Math.addExact(upperValue, -1)}.
*
* @param field field name. must not be {@code null}.
* @param lowerValue lower portion of the range (inclusive).
@ -192,7 +193,8 @@ public final class IntPoint extends Field {
* You can have half-open ranges (which are in fact &lt;/&le; or &gt;/&ge; queries)
* by setting {@code lowerValue[i] = Integer.MIN_VALUE} or {@code upperValue[i] = Integer.MAX_VALUE}.
* <p>
* Ranges are inclusive. For exclusive ranges, pass {@code lowerValue[i] + 1} or {@code upperValue[i] - 1}
* Ranges are inclusive. For exclusive ranges, pass {@code Math.addExact(lowerValue[i], 1)}
* or {@code Math.addExact(upperValue[i], -1)}.
*
* @param field field name. must not be {@code null}.
* @param lowerValue lower portion of the range (inclusive). must not be {@code null}.

View File

@ -174,7 +174,8 @@ public final class LongPoint extends Field {
* You can have half-open ranges (which are in fact &lt;/&le; or &gt;/&ge; queries)
* by setting {@code lowerValue = Long.MIN_VALUE} or {@code upperValue = Long.MAX_VALUE}.
* <p>
* Ranges are inclusive. For exclusive ranges, pass {@code lowerValue + 1} or {@code upperValue - 1}
* Ranges are inclusive. For exclusive ranges, pass {@code Math.addExact(lowerValue, 1)}
* or {@code Math.addExact(upperValue, -1)}.
*
* @param field field name. must not be {@code null}.
* @param lowerValue lower portion of the range (inclusive).
@ -192,7 +193,8 @@ public final class LongPoint extends Field {
* You can have half-open ranges (which are in fact &lt;/&le; or &gt;/&ge; queries)
* by setting {@code lowerValue[i] = Long.MIN_VALUE} or {@code upperValue[i] = Long.MAX_VALUE}.
* <p>
* Ranges are inclusive. For exclusive ranges, pass {@code lowerValue[i] + 1} or {@code upperValue[i] - 1}
* Ranges are inclusive. For exclusive ranges, pass {@code Math.addExact(lowerValue[i], 1)}
* or {@code Math.addExact(upperValue[i], -1)}.
*
* @param field field name. must not be {@code null}.
* @param lowerValue lower portion of the range (inclusive). must not be {@code null}.