Enum IsoFields.Field

    • Field Detail

      • QUARTER_DAYS

        private static final int[] QUARTER_DAYS
    • Constructor Detail

      • Field

        private Field()
    • Method Detail

      • values

        public static IsoFields.Field[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (IsoFields.Field c : IsoFields.Field.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static IsoFields.Field valueOf​(java.lang.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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • getDisplayName

        public java.lang.String getDisplayName​(java.util.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​(java.util.Map<TemporalField,​java.lang.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
      • getWeekRange

        private static int getWeekRange​(int wby)
      • getWeek

        private static int getWeek​(LocalDate date)
      • getWeekBasedYear

        private static int getWeekBasedYear​(LocalDate date)