DateTimeBuilder
Extends:
Builder that can holds date and time fields and related date and time objects.
The builder is used to hold onto different elements of date and time. It is designed as two separate maps:
Static Method Summary
Static Public Methods | ||
public static |
create(field: TemporalField, value: number): DateTimeBuilder Creates a new instance of the builder with a single field-value. |
Constructor Summary
Public Constructor | ||
public |
|
Member Summary
Public Members | ||
public |
chrono: * The chronology. |
|
public |
date: * The date. |
|
public |
excessDays: * The excess days. |
|
public |
fieldValues: * The map of other fields. |
|
public |
The leap second flag. |
|
public |
time: * The time. |
|
public |
zone: * The zone. |
Method Summary
Public Methods | ||
public |
build(type: TemporalQuery): * Builds the specified type from the values in this builder. |
|
public |
getFieldValue0(field: TemporalField): Number |
|
public |
getLong(field: TemporalField): number |
|
public |
isSupported(field: TemporalField): number |
|
public |
query(query: TemporalQuery): * |
|
public |
resolve(resolverStyle: ResolverStyle, resolverFields: Set<TemporalField>): DateTimeBuilder Resolves the builder, evaluating the date and time. |
Inherited Summary
From class TemporalAccessor | ||
public |
get(field: TemporalField): number Gets the value of the specified field as an {@code int}. |
|
public |
query(query: TemporalQuery): * Queries this date-time. |
|
public |
range(field: TemporalField): ValueRange Gets the range of valid values for the specified field. |
Static Public Methods
public static create(field: TemporalField, value: number): DateTimeBuilder source
Creates a new instance of the builder with a single field-value.
This is equivalent to using {@link #addFieldValue(TemporalField, long)} on an empty builder.
Params:
Name | Type | Attribute | Description |
field | TemporalField | the field to add, not null |
|
value | number | the value to add, not null |
Public Constructors
public constructor source
Public Members
Public Methods
public build(type: TemporalQuery): * source
Builds the specified type from the values in this builder.
This attempts to build the specified type from this builder. If the builder cannot return the type, an exception is thrown.
Params:
Name | Type | Attribute | Description |
type | TemporalQuery |
|
the type to invoke {@code from} on, not null |
Return:
* | the extracted value, not null |
Throw:
* |
DateTimeException if an error occurs |
public getFieldValue0(field: TemporalField): Number source
Params:
Name | Type | Attribute | Description |
field | TemporalField |
public getLong(field: TemporalField): number source
Params:
Name | Type | Attribute | Description |
field | TemporalField |
public isSupported(field: TemporalField): number source
Params:
Name | Type | Attribute | Description |
field | TemporalField |
public query(query: TemporalQuery): * source
Override:
TemporalAccessor#queryParams:
Name | Type | Attribute | Description |
query | TemporalQuery |
|
Return:
* |
public resolve(resolverStyle: ResolverStyle, resolverFields: Set<TemporalField>): DateTimeBuilder source
Resolves the builder, evaluating the date and time.
This examines the contents of the builder and resolves it to produce the best available date and time, throwing an exception if a problem occurs. Calling this method changes the state of the builder.
Params:
Name | Type | Attribute | Description |
resolverStyle | ResolverStyle | how to resolve |
|
resolverFields | Set<TemporalField> |