OmniLayer / OmniJ

OmniLayer for Java, JVM, and Android
Apache License 2.0
133 stars 89 forks source link

OmniValue: add of(String) methods #209

Closed msgilligan closed 2 years ago

msgilligan commented 2 years ago

... as requested by @dexX7 .

I was reluctant to add this because I was concerned that an .of(String string) method might not be used properly (it should only be used with strings that use the Omni Core "JSON formatted" convention of always using decimals in strings for divisible amounts and never using decimals in strings of indivisible amounts.

But given that OmniJ itself already had multiple implementations of this method, I guess it makes sense to just add it to OmniValue.

I also tried to make the above concern well-documented in the JavaDoc.