Constants v1.1.0
This is the second public release of the library, it has been heavily tested but please feel free to report any issues found.
To add it as a…
Read MorePublished 02/20/2023 Updated 02/26/2023
Constants is a very small zero dependency Java library packed with constants.
MS.MILLISECOND, MS.SECOND, MS.MINUTE, MS.HOUR, MS.DAY, MS.WEEK, MS.MONTH, MS.YEARNS.NANOSECOND, NS.MILLISECOND, NS.SECOND, NS.MINUTE, NS.HOUR, NS.DAY, NS.WEEK, NS.MONTH, NS.YEARINT.ONE, INT.TEN, INT.HUNDRED, INT.THOUSAND, INT.TEN_THOUSAND, INT.HUNDRED_THOUSAND, INT.MILLIONLONG.ONE, LONG.TEN, LONG.HUNDRED, LONG.THOUSAND, LONG.TEN_THOUSAND, LONG.HUNDRED_THOUSAND, LONG.MILLIONAdd the following to your pom.xml as a maven dependency, or just download the latest release and import it with your IDE.
<dependency>
<groupId>com.konloch</groupId>
<artifactId>Constants</artifactId>
<version>1.1.0</version>
</dependency>
There are four main constant categories, Milliseconds, Nanoseconds, Integer and Long.
This library leverages the fact that constant expressions in Java turn into static numbers rather than being numerically expressed.
So on a bytecode level when compiled, x = 5 * MS.HOUR turns into x = 18000000. This makes using the constants in this library extremely performant.
Milliseconds are under MS, Nanoseconds are under NS, Integer is under INT and Long is under LONG.
This is the second public release of the library, it has been heavily tested but please feel free to report any issues found.
To add it as a…
Read MoreThis is the first public release of the library, it has been heavily tested but please feel free to report any issues found.
To add it as a…
Read More