Class DayOfWeekConverter

java.lang.Object
org.apache.commons.beanutils.converters.AbstractConverter
dev.orne.beans.converters.AbstractDateTimeConverter
dev.orne.beans.converters.DayOfWeekConverter
All Implemented Interfaces:
org.apache.commons.beanutils.Converter

@API(status=STABLE, since="0.1") public class DayOfWeekConverter extends AbstractDateTimeConverter
Implementation of Converter that converts DayOfWeek instances to and from String constant name as String representation.
Since:
0.1
Version:
1.0, 2020-05
Author:
(w) Iker Hernaez
  • Field Details

    • BY_VALUE_PARSER

      public static final DateTimeFormatter BY_VALUE_PARSER
      The day of week by value parser.
    • BY_FULL_TEXT_PARSER

      public static final DateTimeFormatter BY_FULL_TEXT_PARSER
      The day of week by full text parser, for default locale.
    • BY_SHORT_TEXT_PARSER

      public static final DateTimeFormatter BY_SHORT_TEXT_PARSER
      The day of week by short text parser, for default locale.
    • BY_NARROW_TEXT_PARSER

      public static final DateTimeFormatter BY_NARROW_TEXT_PARSER
      The day of week by short text parser, for default locale.
  • Constructor Details

    • DayOfWeekConverter

      public DayOfWeekConverter()
      Creates a new instance that throws a ConversionException if an error occurs.
    • DayOfWeekConverter

      public DayOfWeekConverter(DayOfWeek defaultValue)
      Creates a new instance that returns a default value if an error occurs.
      Parameters:
      defaultValue - The default value to be returned if the value to be converted is missing or an error occurs converting the value
    • DayOfWeekConverter

      public DayOfWeekConverter(@NotNull @NotNull DateTimeFormatter formatter)
      Creates a new instance that throws a ConversionException if an error occurs.
      Parameters:
      formatter - The temporal value formatter and default parser
    • DayOfWeekConverter

      public DayOfWeekConverter(@NotNull @NotNull DateTimeFormatter formatter, DayOfWeek defaultValue)
      Creates a new instance that returns a default value if an error occurs.
      Parameters:
      formatter - The temporal value formatter and default parser
      defaultValue - The default value to be returned if the value to be converted is missing or an error occurs converting the value
  • Method Details