public class KotlinUtilsKt
Modifier and Type | Method and Description |
---|---|
static NonExistentClass |
contextLogger(java.lang.Object $receiver)
When called from a companion object, returns the logger for the enclosing class.
|
static void |
debug(NonExistentClass $receiver,
Function0<java.lang.String> msg)
Log a DEBUG level message produced by evaluating the given lamdba, but only if DEBUG logging is enabled.
|
static NonExistentClass |
detailedLogger()
Returns the logger used for detailed logging.
|
static int |
exactAdd(int $receiver,
int b)
Like the + operator but throws ArithmeticException in case of integer overflow.
|
static long |
exactAdd(long $receiver,
long b)
Like the + operator but throws ArithmeticException in case of integer overflow.
|
static java.time.Duration |
getDays(int $receiver)
Extension method for easier construction of Durations in terms of integer days:
val twoDays = 2.days . |
static java.time.Duration |
getHours(int $receiver)
Extension method for easier construction of Durations in terms of integer hours:
val twoHours = 2.hours . |
static java.time.Duration |
getMillis(int $receiver)
Extension method for easier construction of Durations in terms of integer milliseconds:
val twoMillis = 2.millis . |
static java.time.Duration |
getMinutes(int $receiver)
Extension method for easier construction of Durations in terms of integer minutes:
val twoMinutes = 2.minutes . |
static <V> V |
getOrThrow(java.util.concurrent.Future<V> $receiver,
java.time.Duration timeout)
Same as Future.get except that the ExecutionException is unwrapped.
|
static java.time.Duration |
getSeconds(int $receiver)
Extension method for easier construction of Durations in terms of integer seconds:
val twoSeconds = 2.seconds . |
static <T> NonEmptySet<T> |
toNonEmptySet(java.util.Collection<? extends T> $receiver) |
static void |
trace(NonExistentClass $receiver,
Function0<java.lang.String> msg)
Log a TRACE level message produced by evaluating the given lamdba, but only if TRACE logging is enabled.
|
static <T> PropertyDelegate<T> |
transient(Function0<? extends T> initializer)
A simple wrapper that enables the use of Kotlin's
val x by transient { ... } syntax. Such a property
will not be serialized, and if it's missing (or the first time it's accessed), the initializer will be
used to set it up. |
public static int exactAdd(int $receiver, int b)
Like the + operator but throws ArithmeticException in case of integer overflow.
public static long exactAdd(long $receiver, long b)
Like the + operator but throws ArithmeticException in case of integer overflow.
public static NonExistentClass detailedLogger()
Returns the logger used for detailed logging.
public static NonExistentClass contextLogger(java.lang.Object $receiver)
When called from a companion object, returns the logger for the enclosing class.
public static void trace(NonExistentClass $receiver, Function0<java.lang.String> msg)
Log a TRACE level message produced by evaluating the given lamdba, but only if TRACE logging is enabled.
public static void debug(NonExistentClass $receiver, Function0<java.lang.String> msg)
Log a DEBUG level message produced by evaluating the given lamdba, but only if DEBUG logging is enabled.
public static java.time.Duration getDays(int $receiver)
Extension method for easier construction of Durations in terms of integer days: val twoDays = 2.days
.
public static java.time.Duration getHours(int $receiver)
Extension method for easier construction of Durations in terms of integer hours: val twoHours = 2.hours
.
public static java.time.Duration getMinutes(int $receiver)
Extension method for easier construction of Durations in terms of integer minutes: val twoMinutes = 2.minutes
.
public static java.time.Duration getSeconds(int $receiver)
Extension method for easier construction of Durations in terms of integer seconds: val twoSeconds = 2.seconds
.
public static java.time.Duration getMillis(int $receiver)
Extension method for easier construction of Durations in terms of integer milliseconds: val twoMillis = 2.millis
.
public static <T> PropertyDelegate<T> transient(Function0<? extends T> initializer)
A simple wrapper that enables the use of Kotlin's val x by transient { ... }
syntax. Such a property
will not be serialized, and if it's missing (or the first time it's accessed), the initializer will be
used to set it up.
public static <T> NonEmptySet<T> toNonEmptySet(java.util.Collection<? extends T> $receiver)
NonEmptySet.Companion.copyOf
public static <V> V getOrThrow(java.util.concurrent.Future<V> $receiver, java.time.Duration timeout)
Same as Future.get except that the ExecutionException is unwrapped.