Package javax.time.calendar
Class DateResolvers.PartLenient
- java.lang.Object
-
- javax.time.calendar.DateResolvers.PartLenient
-
- All Implemented Interfaces:
java.io.Serializable
,DateResolver
- Enclosing class:
- DateResolvers
private static class DateResolvers.PartLenient extends java.lang.Object implements DateResolver, java.io.Serializable
Class implementing partLenient resolver.
-
-
Field Summary
Fields Modifier and Type Field Description private static DateResolver
INSTANCE
The singleton instance.private static long
serialVersionUID
A serialization identifier for this class.
-
Constructor Summary
Constructors Modifier Constructor Description private
PartLenient()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private java.lang.Object
readResolve()
LocalDate
resolveDate(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:
resolveDate
in 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
-
-