
Public Member Functions | |
| __init__ (self, Union[int, float] minimum, Union[int, float] maximum, Union[int, float] increment) | |
| Creates a range with specified minimum, maximum, and increment values. | |
| bool | __eq__ (self, Any other) |
| Union[int, float] | increment (self) |
| Retrieves the increment value associated with this range. | |
| str | __str__ (self) |
| Returns a string representation of the Range object. | |
| str | __repr__ (self) |
| Return an unambiguous string of the Range object. | |
Data Fields | |
| minimum | |
| increment | |
Protected Attributes | |
| Union[int, float] | _increment = increment |
Represents a numeric range with defined boundaries and a fixed increment.
A Range models a continuous sequence of values starting from a minimum value, ending at a maximum value, and progressing in steps defined by an increment. It supports integers and floating-point numbers.
This class ensures that the increment does not exceed the total span between the minimum and maximum bounds. The range is inclusive of its boundary values.
| __init__ | ( | self, | |
| Union[int, float] | minimum, | ||
| Union[int, float] | maximum, | ||
| Union[int, float] | increment ) |
Creates a range with specified minimum, maximum, and increment values.
| InvalidParameterException | If minimum is greater than maximum, or if increment exceeds the total range span. |
| minimum | The inclusive starting (lower) boundary of the range. |
| maximum | The inclusive ending (upper) boundary of the range. |
| increment | The step size or increment between values within the range. |
| str __repr__ | ( | self | ) |
| str __str__ | ( | self | ) |
| Union[int, float] increment | ( | self | ) |