[threeten-dev] Reconsidering generics on Chrono classes
Roger Riggs
Roger.Riggs at oracle.com
Sat Feb 2 13:43:09 PST 2013
Hi,
I took another look at the use of generics in the Chrono classes and
drafted an alternative that is an improvement.
Issue #191 mentions that the generics do not add (enough) value.
Changing the parameter from Chronology to the concrete ChronoLocalDate type
is more usable for the case where the concrete date type is being used
deliberately
and enable greater fluency.
Exposing the concrete date types along with the Chronology types makes
it easier
to write calendar specific applications and makes code using
ChronoLocalDateTime
and ChronoZonedDateTime more fluent.
Take a look at the comment.
javadoc:
http://cr.openjdk.java.net/~rriggs/javadoc-chrono-generics-191/
webrev:
http://cr.openjdk.java.net/~rriggs/webrev-chrono-generics-191/
This is not ready to commit, though the functionality of the local date
classes is stable, the javadoc needs improvement.
In particular, the exposure of useful methods in the javadoc of each class
is uneven since some are inherited and only appear in the inherited section
of the javadoc.
Thanks, Roger
More information about the threeten-dev
mailing list