Closed LVMVRQUXL closed 1 year ago
Introduce a new hierarchy of integers in the kotools.types.number package with the following types:
kotools.types.number
AnyInt
NonZeroInt
PositiveInt
NegativeInt
StrictlyPositiveInt
StrictlyNegativeInt
ZeroInt
sealed interface AnyInt sealed interface NonZeroInt : AnyInt sealed interface PositiveInt : AnyInt sealed interface NegativeInt : AnyInt class StrictlyPositiveInt : NonZeroInt, PositiveInt class StrictlyNegativeInt : NonZeroInt, NegativeInt object ZeroInt : PositiveInt, NegativeInt
kotools.types
Work in progress
Done.
Make the following types serializable:
Update the serialization of the following types:
Description
Introduce a new hierarchy of integers in the
kotools.types.number
package with the following types:AnyInt
representing all integersNonZeroInt
representing integers other than zeroPositiveInt
representing positive integersNegativeInt
representing negative integersStrictlyPositiveInt
representing strictly positive integersStrictlyNegativeInt
representing strictly negative integersZeroInt
representing the zero integer.Code example
Checklist
ZeroInt
type.StrictlyPositiveInt
type.StrictlyNegativeInt
type.NonZeroInt
type.PositiveInt
type.NegativeInt
type.AnyInt
.kotools.types
package.Work in progress
section in changelog.