[threeten-dev] [threeten-develop] JSR 310 Final Release Materials and Review
Douglas Surber
douglas.surber at oracle.com
Thu Jan 23 07:59:04 PST 2014
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.
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.
Douglas
More information about the threeten-dev
mailing list