Mathematical Software Components. This library is actively maintained, and aims to stay updated. New feature proposals are welcome, but may not be included.
There is an Integer Range Java interface that can be enhanced by providing two simple implementations.
Fixed Integer Range
This implementation is constructed with the start and end of range values. The values will be declared as final.
Mutable Integer Range
The key difference with this implementation is that the start and end of range values can be modified.
Constructors
The range constructors will ensure that regardless of input values, the start of range value will not be greater than the end of range. No exceptions will be thrown, the values will be swapped.
These implementations can provide optional constructors with one parameter that uses zero as the other range endpoint.
There is an Integer Range Java interface that can be enhanced by providing two simple implementations.
Fixed Integer Range
This implementation is constructed with the start and end of range values. The values will be declared as final.
Mutable Integer Range
The key difference with this implementation is that the start and end of range values can be modified.
Constructors
The range constructors will ensure that regardless of input values, the start of range value will not be greater than the end of range. No exceptions will be thrown, the values will be swapped.
These implementations can provide optional constructors with one parameter that uses zero as the other range endpoint.