IntervalRecord
Operations over inclusive ranges of ordered values.
Fields
| Name | Type | Description |
|---|---|---|
| singleton | Interval.singleton value | Builds the interval containing exactly one value. |
| between | Interval.between first second | Builds the smallest interval containing both values, ordering them as needed. |
| create | Interval.create lower upper | Builds an interval from a pair the caller asserts is already ordered, failing when it is not. |
| lower | Interval.lower interval | Returns the inclusive lower bound. |
| upper | Interval.upper interval | Returns the inclusive upper bound. |
| toPair | Interval.toPair interval | Returns the bounds as a pair. |
| isSingleton | Interval.isSingleton interval | Returns whether the interval contains exactly one value. |
| contains | Interval.contains value interval | Returns whether the value lies within the inclusive bounds. |
| containsInterval | Interval.containsInterval inner outer | Returns whether every value of the inner interval lies within the outer one. |
| overlaps | Interval.overlaps first second | Returns whether the two intervals share at least one value. |
| intersect | Interval.intersect first second | Returns the shared portion of two intervals, or None when they are disjoint. |
| union | Interval.union first second | Returns the combined interval when the two overlap, or None when a gap between them would have to be invented. |
| span | Interval.span first second | Returns the smallest interval containing both inputs, gap included. |
| extendTo | Interval.extendTo value interval | Returns the smallest interval containing the input and the value. |
| ofNonEmptyList | Interval.ofNonEmptyList values | Returns the smallest interval containing every supplied value. |
| clamp | Interval.clamp value interval | Restricts a value to the interval's bounds. |
| mapMonotonic | Interval.mapMonotonic mapping interval | Applies a mapping to both bounds. |
| toConstraint | Interval.toConstraint interval | Returns the portable constraint that admits exactly this interval's values. |
| duration | Interval.duration interval | Returns how long an interval of instants lasts. |
| widthInt | Interval.widthInt interval | Returns the distance between the bounds. |
| widthDecimal | Interval.widthDecimal interval | Returns the distance between the bounds. |
| refinement | Interval.refinement interval | Returns a refinement admitting values that lie within the interval. |
| Upper | this.Upper | Returns the inclusive upper bound. |
| Lower | this.Lower | Returns the inclusive lower bound. |
| LowerValue | LowerValue | No description available. |
| UpperValue | UpperValue | No description available. |