Home

hexagon_core / com.hexagonkt.helpers

Package com.hexagonkt.helpers

JVM information, a logger class and other useful utilities.

Types

Name Summary
Jvm object Jvm
Logger Logger class with Kotlin improvements like lazy evaluation. It is backed by a SLF4J compatible logger.class Logger
StringsSamplesTest class StringsSamplesTest

Exceptions

Name Summary
CodedException Exception with a numeric code.class CodedException :RuntimeException
MultipleException Exception with a list of causes. Cause is null as it can't be tell which one of the list is the cause.class MultipleException :RuntimeException

Extensions for External Classes

Name Summary
java.time.LocalDate
java.time.LocalDateTime
java.time.LocalTime
java.time.ZonedDateTime
java.util.Date
java.util.UUID
kotlin.collections.Collection
kotlin.collections.List
kotlin.collections.Map
kotlin.Int
kotlin.Long
kotlin.String
kotlin.text.Regex
kotlin.Throwable

Properties

Name Summary
eol Runtime specific end of line.val eol:String
fail Syntax sugar to throw errors.val fail:Nothing
logger Default logger when you are lazy to declare one.val logger:Logger

Functions

Name Summary
fail Syntax sugar to throw errors.fun fail():Nothing
notEmpty fun <V> notEmpty(it: V?):Boolean
retry Executes a lambda until no exception is thrown or a number of times is reached.fun <T> retry(times:Int, delay:Long, func: () -> T): T
utf8 fun utf8(vararg bytes:Int):String
uuid fun uuid(text:String):UUID
fun uuid(bytes:ByteArray):UUID