Udostępnij za pośrednictwem


HijrahEra.Range(ITemporalField) Method

Definition

Gets the range of valid values for the specified field.

[Android.Runtime.Register("range", "(Ljava/time/temporal/TemporalField;)Ljava/time/temporal/ValueRange;", "", ApiSince=26)]
public Java.Time.Temporal.ValueRange? Range (Java.Time.Temporal.ITemporalField? field);
[<Android.Runtime.Register("range", "(Ljava/time/temporal/TemporalField;)Ljava/time/temporal/ValueRange;", "", ApiSince=26)>]
abstract member Range : Java.Time.Temporal.ITemporalField -> Java.Time.Temporal.ValueRange
override this.Range : Java.Time.Temporal.ITemporalField -> Java.Time.Temporal.ValueRange

Parameters

field
ITemporalField

the field to query the range for, not null

Returns

the range of valid values for the field, not null

Implements

Attributes

Remarks

Gets the range of valid values for the specified field.

The range object expresses the minimum and maximum valid values for a field. This era is used to enhance the accuracy of the returned range. If it is not possible to return the range, because the field is not supported or for some other reason, an exception is thrown.

If the field is a ChronoField then the query is implemented here. The ERA field returns the range. All other ChronoField instances will throw an UnsupportedTemporalTypeException.

If the field is not a ChronoField, then the result of this method is obtained by invoking TemporalField.rangeRefinedBy(TemporalAccessor) passing this as the argument. Whether the range can be obtained is determined by the field.

The ERA field returns a range for the one valid Hijrah era.

Java documentation for java.time.chrono.HijrahEra.range(java.time.temporal.TemporalField).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to