UnsignedInt (Max Value Version)
Description
UnsignedInt is a datatype for unsigned integers in Java since they are conspicuously missing. It is important to note this datatype does not actually create an unsigned integer instead it enforces rules on the integer type that force it to always be positive. So the purpose of this class is more about data integrity than actually solving the issue of an unsigned integer.
The major difference between this version and the original UnsignedInt is that this version implements a max value cap to the datatype.
Source
Source code here.
License
The license is very simple "Do whatever you want with this code" and use it where ever you want.
Documentation
Javadocs here.
Operation | - Method Implemented By |
= | setValue(...) |
== | equals(...) |
> | greaterThan(...) |
< | lesserThan(...) |
++ | increment(...) |
-- | decrement(...) |
+= | addBy(...) |
+ | add(...) |
-= | subtractBy(...) |
- | subtract(...) |
*= | multiplyBy(...) |
* | multiply(...) |
/= | divideBy(...) |
/ | divide(...) |