[threeten-dev] [threeten-develop] JSR 310 Final Release Materials and Review

Stephen Colebourne scolebourne at joda.org
Thu Jan 23 08:18:20 PST 2014


On 23 January 2014 15:59, Douglas Surber <douglas.surber at oracle.com> 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


More information about the threeten-dev mailing list