Re: [threeten-develop] [threeten-dev] JSR 310 Final Release Materials and Review
Status: Alpha
Brought to you by:
scolebourne
From: Stephen C. <sco...@jo...> - 2014-01-23 16:18:49
|
On 23 January 2014 15:59, Douglas Surber <dou...@or...> wrote: > At 11:03 PM 1/22/2014, Stephen Colebourne wrote: >> >> > As an aside, why 'MAX' rather than 'MAX_VALUE' as is used elsewhere? >> >> The java.lang.Integer class uses MAX_VALUE to return the equivalent >> primitive value. ie. Integer.MAX_VALUE returns an int not an Integer. >> With 310, there is no separate value type, so I used MAX. > > java.time.Year uses MAX_VALUE and MIN_VALUE. Because it returns int, not Year. > I think the distinction is too subtle for me. I would just type MAX_VALUE > because that is the name of the constant that defines the largest element in > the range, regardless of Object or primitive. I'm happy with the choice I made here. Its up to Roger/Sherman to comment otherwise. Stephen |