Minor: add a doc for the "using" infix function.

This commit is contained in:
Mike Hearn 2017-05-18 16:11:42 +02:00
parent 8dde7757f1
commit 8d538e14a0

View File

@ -56,6 +56,7 @@ infix fun Amount<Currency>.issuedBy(deposit: PartyAndReference) = Amount(quantit
//// Requirements /////////////////////////////////////////////////////////////////////////////////////////////////////
object Requirements {
/** Throws [IllegalArgumentException] if the given expression evaluates to false. */
@Suppress("NOTHING_TO_INLINE") // Inlining this takes it out of our committed ABI.
infix inline fun String.using(expr: Boolean) {
if (!expr) throw IllegalArgumentException("Failed requirement: $this")