Package org.threeten.bp.temporal
Enum IsoFields.Field
- All Implemented Interfaces:
Serializable,Comparable<IsoFields.Field>,TemporalField
- Enclosing class:
- IsoFields
Implementation of the field.
-
Enum Constant Summary
Enum Constants -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetDisplayName(Locale locale) Gets the display name for the field in the requested locale.private static intprivate static intgetWeekBasedYear(LocalDate date) private static intgetWeekRange(int wby) private static ValueRangegetWeekRange(LocalDate date) booleanChecks if this field is date-based.private static booleanisIso(TemporalAccessor temporal) booleanChecks if this field is time-based.resolve(Map<TemporalField, Long> fieldValues, TemporalAccessor partialTemporal, ResolverStyle resolverStyle) Resolves the date/time information in the builderstatic IsoFields.FieldReturns the enum constant of this type with the specified name.static IsoFields.Field[]values()Returns an array containing the constants of this enum type, in the order they are declared.Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOfMethods inherited from interface org.threeten.bp.temporal.TemporalField
adjustInto, getBaseUnit, getFrom, getRangeUnit, isSupportedBy, range, rangeRefinedBy
-
Enum Constant Details
-
DAY_OF_QUARTER
-
QUARTER_OF_YEAR
-
WEEK_OF_WEEK_BASED_YEAR
-
WEEK_BASED_YEAR
-
-
Field Details
-
QUARTER_DAYS
private static final int[] QUARTER_DAYS
-
-
Constructor Details
-
Field
private Field()
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
getDisplayName
Description copied from interface:TemporalFieldGets 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:
getDisplayNamein interfaceTemporalField- 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:TemporalFieldResolves the date/time information in the builderThis method is invoked during the resolve of the builder. Implementations should combine the associated field with others to form objects like
LocalDate,LocalTimeandLocalDateTime- Specified by:
resolvein interfaceTemporalField- Parameters:
fieldValues- the map of fields to values, which can be updated, not nullpartialTemporal- the partially complete temporal to query for zone and chronology; querying for other things is undefined and not recommended, not nullresolverStyle- 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:TemporalFieldChecks if this field is date-based.A date-based field can be derived from epoch-day
- Specified by:
isDateBasedin interfaceTemporalField- Returns:
- true if date-based
-
isTimeBased
public boolean isTimeBased()Description copied from interface:TemporalFieldChecks if this field is time-based.A time-based field can be derived from nano-of-day
- Specified by:
isTimeBasedin interfaceTemporalField- Returns:
- true if time-based
-
isIso
-
getWeekRange
-
getWeekRange
private static int getWeekRange(int wby) -
getWeek
-
getWeekBasedYear
-