Module java.base

Class ValueRange

java.lang.Object
java.time.temporal.ValueRange
All Implemented Interfaces:
Serializable

public final class ValueRange extends Object implements Serializable
The range of valid values for a date-time field.

All TemporalField instances have a valid range of values. For example, the ISO day-of-month runs from 1 to somewhere between 28 and 31. This class captures that valid range.

It is important to be aware of the limitations of this class. Only the minimum and maximum values are provided. It is possible for there to be invalid values within the outer range. For example, a weird field may have valid values of 1, 2, 4, 6, 7, thus have a range of '1 - 7', despite that fact that values 3 and 5 are invalid.

Instances of this class are not tied to a specific field.

Implementation Requirements:
This class is immutable and thread-safe.
Since:
1.8
See Also: