[ https://issues.apache.org/jira/browse/LUCENE-1857?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
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: https://issues.apache.org/jira/browse/LUCENE-1857 > 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: java-dev-unsubscr...@lucene.apache.org For additional commands, e-mail: java-dev-h...@lucene.apache.org