diff --git a/core/src/main/kotlin/core/Utils.kt b/core/src/main/kotlin/core/Utils.kt index 5d140972e9..59243ac333 100644 --- a/core/src/main/kotlin/core/Utils.kt +++ b/core/src/main/kotlin/core/Utils.kt @@ -15,6 +15,7 @@ import com.google.common.util.concurrent.SettableFuture import org.slf4j.Logger import java.io.BufferedInputStream import java.io.InputStream +import java.math.BigDecimal import java.nio.file.Files import java.nio.file.Path import java.security.SecureRandom @@ -32,6 +33,8 @@ val Int.hours: Duration get() = Duration.ofHours(this.toLong()) val Int.minutes: Duration get() = Duration.ofMinutes(this.toLong()) val Int.seconds: Duration get() = Duration.ofSeconds(this.toLong()) +val String.d: BigDecimal get() = BigDecimal(this) + /** * Returns a random positive long generated using a secure RNG. This function sacrifies a bit of entropy in order to * avoid potential bugs where the value is used in a context where negative numbers are not expected.