Package javax.time.calendar
Class DateResolvers.PreviousValid
- java.lang.Object
-
- javax.time.calendar.DateResolvers.PreviousValid
-
- All Implemented Interfaces:
java.io.Serializable,DateResolver
- Enclosing class:
- DateResolvers
private static class DateResolvers.PreviousValid extends java.lang.Object implements DateResolver, java.io.Serializable
Class implementing previousValid resolver.
-
-
Field Summary
Fields Modifier and Type Field Description private static DateResolverINSTANCEThe singleton instance.private static longserialVersionUIDA serialization identifier for this class.
-
Constructor Summary
Constructors Modifier Constructor Description privatePreviousValid()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private java.lang.ObjectreadResolve()LocalDateresolveDate(int year, MonthOfYear monthOfYear, int dayOfMonth)Resolves the combination of year, month and day into a date.
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
A serialization identifier for this class.- See Also:
- Constant Field Values
-
INSTANCE
private static final DateResolver INSTANCE
The singleton instance.
-
-
Method Detail
-
readResolve
private java.lang.Object readResolve()
-
resolveDate
public LocalDate resolveDate(int year, MonthOfYear monthOfYear, int dayOfMonth)
Resolves the combination of year, month and day into a date.The purpose of resolution is to avoid invalid dates. Each of the three fields are individually valid. However, the day-of-month may not be valid for the associated month and year.
- Specified by:
resolveDatein interfaceDateResolver- Parameters:
year- the year that was input, from MIN_YEAR to MAX_YEARmonthOfYear- the month-of-year, not nulldayOfMonth- the proposed day-of-month, from 1 to 31- Returns:
- the resolved date, never null
-
-