lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler (JIRA)" <>
Subject [jira] Updated: (LUCENE-1857) Change NumericRangeQuery to generics (for the numeric type)
Date Thu, 01 Oct 2009 10:50:25 GMT


Uwe Schindler updated LUCENE-1857:

    Attachment: LUCENE-1857.patch

Patch that adds generics:
After thinking about it the whole night: The "static ctors" cannot be removed, because even
with generics there is not type safety. The private ctor needs the valSize information, to
choose the right term encoding. This could theoretically be determined by instanceof checks,
but would not work, if you use null for both upper and lower bounds.
This generified version is easier to handle, because it returns the correct type when calling
getMin()/getMax(). It also uses generics for its collections api usage.

> Change NumericRangeQuery to generics (for the numeric type)
> -----------------------------------------------------------
>                 Key: LUCENE-1857
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Search
>            Reporter: Uwe Schindler
>            Assignee: Uwe Schindler
>            Priority: Minor
>             Fix For: 3.0
>         Attachments: LUCENE-1857.patch
> NumericRangeQuery/Filter can use generics for more type-safety: NumericRangeQuery<T
extends Number>

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message