Class DateTimeFormatterCache

    • Field Detail

      • MAX_CACHE_SIZE

        public static final int MAX_CACHE_SIZE
        The default number of items to keep in the cache
        See Also:
        Constant Field Values
    • Method Detail

      • isInstantiated

        public static boolean isInstantiated()
      • getDateTimeFormatterStrict

        @Nonnull
        public static DateTimeFormatter getDateTimeFormatterStrict​(@Nonnull @Nonempty
                                                                   String sPattern)
        Get the cached DateTimeFormatter using STRICT resolving.
        Parameters:
        sPattern - The pattern to retrieve. May neither be null nor empty.
        Returns:
        The compiled DateTimeFormatter and never null .
        Throws:
        IllegalArgumentException - If the pattern is invalid
      • getDateTimeFormatterSmart

        @Nonnull
        public static DateTimeFormatter getDateTimeFormatterSmart​(@Nonnull @Nonempty
                                                                  String sPattern)
        Get the cached DateTimeFormatter using SMART resolving.
        Parameters:
        sPattern - The pattern to retrieve. May neither be null nor empty.
        Returns:
        The compiled DateTimeFormatter and never null .
        Throws:
        IllegalArgumentException - If the pattern is invalid
      • getDateTimeFormatterLenient

        @Nonnull
        public static DateTimeFormatter getDateTimeFormatterLenient​(@Nonnull @Nonempty
                                                                    String sPattern)
        Get the cached DateTimeFormatter using LENIENT resolving.
        Parameters:
        sPattern - The pattern to retrieve. May neither be null nor empty.
        Returns:
        The compiled DateTimeFormatter and never null .
        Throws:
        IllegalArgumentException - If the pattern is invalid
      • getDateTimeFormatter

        @Nonnull
        public static DateTimeFormatter getDateTimeFormatter​(@Nonnull @Nonempty
                                                             String sPattern,
                                                             @Nonnull
                                                             ResolverStyle eResolverStyle)
        Get the cached DateTimeFormatter using the provided resolver style.
        Parameters:
        sPattern - The pattern to retrieve. May neither be null nor empty.
        eResolverStyle - The resolver style to be used. May not be null.
        Returns:
        The compiled DateTimeFormatter and never null.
        Throws:
        IllegalArgumentException - If the pattern is invalid