Enum IsoFields.Field

java.lang.Object
java.lang.Enum<IsoFields.Field>
org.threeten.bp.temporal.IsoFields.Field
All Implemented Interfaces:
Serializable, Comparable<IsoFields.Field>, TemporalField
Enclosing class:
IsoFields

private static enum IsoFields.Field extends Enum<IsoFields.Field> implements TemporalField
Implementation of the field.
  • Enum Constant Details

  • Field Details

    • QUARTER_DAYS

      private static final int[] QUARTER_DAYS
  • Constructor Details

    • Field

      private Field()
  • Method Details

    • values

      public static IsoFields.Field[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static IsoFields.Field valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • getDisplayName

      public String getDisplayName(Locale locale)
      Description copied from interface: TemporalField
      Gets the display name for the field in the requested locale.

      If there is no display name for the locale then a suitable default must be returned.

      The default implementation must check the locale is not null and return toString().

      Specified by:
      getDisplayName in interface TemporalField
      Parameters:
      locale - the locale to use, not null
      Returns:
      the display name for the locale or a suitable default, not null
    • resolve

      public TemporalAccessor resolve(Map<TemporalField,Long> fieldValues, TemporalAccessor partialTemporal, ResolverStyle resolverStyle)
      Description copied from interface: TemporalField
      Resolves the date/time information in the builder

      This method is invoked during the resolve of the builder. Implementations should combine the associated field with others to form objects like LocalDate, LocalTime and LocalDateTime

      Specified by:
      resolve in interface TemporalField
      Parameters:
      fieldValues - the map of fields to values, which can be updated, not null
      partialTemporal - the partially complete temporal to query for zone and chronology; querying for other things is undefined and not recommended, not null
      resolverStyle - the requested type of resolve, not null
      Returns:
      the resolved temporal object; null if resolving only changed the map, or no resolve occurred
    • isDateBased

      public boolean isDateBased()
      Description copied from interface: TemporalField
      Checks if this field is date-based.

      A date-based field can be derived from epoch-day

      Specified by:
      isDateBased in interface TemporalField
      Returns:
      true if date-based
    • isTimeBased

      public boolean isTimeBased()
      Description copied from interface: TemporalField
      Checks if this field is time-based.

      A time-based field can be derived from nano-of-day

      Specified by:
      isTimeBased in interface TemporalField
      Returns:
      true if time-based
    • isIso

      private static boolean isIso(TemporalAccessor temporal)
    • getWeekRange

      private static ValueRange getWeekRange(LocalDate date)
    • getWeekRange

      private static int getWeekRange(int wby)
    • getWeek

      private static int getWeek(LocalDate date)
    • getWeekBasedYear

      private static int getWeekBasedYear(LocalDate date)