Class DateResolvers


  • public final class DateResolvers
    extends java.lang.Object
    Provides common implementations of DateResolver.

    DateResolvers is a utility class. All resolvers returned are immutable and thread-safe.

    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private DateResolvers()
      Private constructor since this is a utility class.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static DateResolver nextValid()
      Returns the next valid day resolver, which adjusts the date to be valid by moving to the first of the next month.
      static DateResolver 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.
      static DateResolver previousValid()
      Returns the previous valid day resolver, which adjusts the date to be valid by moving to the last valid day of the month.
      static DateResolver strict()
      Returns the strict resolver which does not manipulate the state in any way, resulting in an exception for all invalid values.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DateResolvers

        private DateResolvers()
        Private constructor since this is a utility class.
    • Method Detail

      • strict

        public static DateResolver 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

        public static DateResolver 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

        public static DateResolver 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

        public static DateResolver 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