Skip to content

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 class Logger
Logger class with Kotlin improvements like lazy evaluation. It is backed by a SLF4J compatible logger.
RequiredKeysMap class RequiredKeysMap<K, V> :Map<K,V>
Resource class Resource
Absolute resource (start from root package without starting slash). Ie: foo/bar/res.txt instead /foo/bar/res.txt
StringsSamplesTest class StringsSamplesTest

Exceptions

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

Extensions for External Classes

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

Properties

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

Functions

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