Class DateResolvers
java.lang.Object
javax.time.calendar.DateResolvers
Provides common implementations of
DateResolver.
DateResolvers is a utility class. All resolvers returned are immutable and thread-safe.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classClass implementing nextValid resolver.private static classClass implementing partLenient resolver.private static classClass implementing previousValid resolver.private static classClass implementing strict resolver. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivatePrivate constructor since this is a utility class. -
Method Summary
Modifier and TypeMethodDescriptionstatic DateResolverReturns the next valid day resolver, which adjusts the date to be valid by moving to the first of the next month.static DateResolverReturns the part lenient resolver, which adjusts the date to be valid by moving it to the next month by the number of days that are invalid up to the 31st of the month.static DateResolverReturns the previous valid day resolver, which adjusts the date to be valid by moving to the last valid day of the month.static DateResolverstrict()Returns the strict resolver which does not manipulate the state in any way, resulting in an exception for all invalid values.
-
Constructor Details
-
DateResolvers
private DateResolvers()Private constructor since this is a utility class.
-
-
Method Details
-
strict
Returns the strict resolver which does not manipulate the state in any way, resulting in an exception for all invalid values.- Returns:
- the strict resolver, never null
-
previousValid
Returns the previous valid day resolver, which adjusts the date to be valid by moving to the last valid day of the month.- Returns:
- the previous valid day resolver, never null
-
nextValid
Returns the next valid day resolver, which adjusts the date to be valid by moving to the first of the next month.- Returns:
- the next valid day resolver, never null
-
partLenient
Returns the part lenient resolver, which adjusts the date to be valid by moving it to the next month by the number of days that are invalid up to the 31st of the month.- Returns:
- the part lenient resolver, never null
-