We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello. I think that trows is not kotlin way
Please add orNull version to all toDecimals parsers. Look to some examples like String.toBooleranOrNull implementation
orNull
toDecimals
String.toBooleranOrNull
for example i create this
fun String.toBigDecimalOrNull (exponentModifier: Long? = null, decimalMode: DecimalMode? = null) : BigDecimal? = runCatching { this.toBigDecimal(exponentModifier, decimalMode) }.getOrNull() fun Byte.toBigDecimalOrNull (exponentModifier: Long? = null, decimalMode: DecimalMode? = null) : BigDecimal? = runCatching { this.toBigDecimal(exponentModifier, decimalMode) }.getOrNull() fun Float.toBigDecimalOrNull (exponentModifier: Long? = null, decimalMode: DecimalMode? = null) : BigDecimal? = runCatching { this.toBigDecimal(exponentModifier, decimalMode) }.getOrNull() fun Double.toBigDecimalOrNull (exponentModifier: Long? = null, decimalMode: DecimalMode? = null) : BigDecimal? = runCatching { this.toBigDecimal(exponentModifier, decimalMode) }.getOrNull() fun Long.toBigDecimalUsingSignificandAndExponentOrNull(exponent: Long, decimalMode: DecimalMode? = null) : BigDecimal? = runCatching { this.toBigDecimalUsingSignificandAndExponent(exponent, decimalMode) }.getOrNull() fun Int.toBigDecimalUsingSignificandAndExponentOrNull(exponent: Long, decimalMode: DecimalMode? = null) : BigDecimal? = runCatching { this.toBigDecimalUsingSignificandAndExponent(exponent, decimalMode) }.getOrNull()
P.S. Please add @Throws to throwable funcs. P.S.S @SharedImmutable Depricated
@Throws
@SharedImmutable
P.P.P.S Intrestiong info from kotlin. not for this issue. Types definitions variants:
T
<T>
<T : Any?>
T?
T & Any
The text was updated successfully, but these errors were encountered:
As I mentioned in Issue #253 then orElse and/or orDefault would also make sense.
orElse
orDefault
Sorry, something went wrong.
No branches or pull requests
Hello. I think that trows is not kotlin way
Please add
orNull
version to alltoDecimals
parsers. Look to some examples likeString.toBooleranOrNull
implementationfor example i create this
P.S. Please add
@Throws
to throwable funcs.P.S.S
@SharedImmutable
DepricatedP.P.P.S Intrestiong info from kotlin. not for this issue. Types definitions variants:
T
- can be nullable becouse by default<T>
==<T : Any?>
T?
- is nullanleT & Any
- strict non null - newThe text was updated successfully, but these errors were encountered: