It is just for some type safety (with generics it would be better to
handle). The problem is, that overloading the ctor with long, int, float,
double makes it really hard to choose the right one (you miss an L when
passing anumber and get an int range query and so on, especially when Java
5's autoboxing is on). With the static "ctor" methods, it is clear what you
create (and conforms to API of NumericField).

Uwe

-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: [email protected]

> -----Original Message-----
> From: Grant Ingersoll [mailto:[email protected]]
> Sent: Wednesday, September 23, 2009 1:33 AM
> To: [email protected]
> Subject: NumericRangeQuery "static" constructors
> 
> I was wondering what was the reason for the "static" constructors on
> the NumericRangeQuery?  I don't get the point of a static method call
> that simply passes through to a normal constructor.  Are people
> somehow magically more capable of discerning the meaning of a static
> method than simply calling new NumericRangeQuery() and passing in the
> same parameters?
> 
> -Grant
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to