Google Core Libraries for Java 1.5+
4
votes
2answers
93 views
Helper class to memoize DateFormats application-wide
Premise
Consider the following method:
static String formatMyDate(Date date) {
return new SimpleDateFormat("yyyy-MM-dd").format(date);
}
It's often desirable to memoize DateFormat objects so ...
2
votes
1answer
141 views
Ability to forget the memoized supplier value
Guava has a feature request which is asking to provide the ability to forget memoized value on a given supplier.
On top on that I needed another functionality where if during the calculation of ...
1
vote
2answers
238 views
At most one LocalDate per month in a list
I'm implementing argument check in a method where one parameter is a List of LocalDate objects (from Joda-Time). I want to make sure that List contains at most one LocalDate per month.
public ...