ifPresent

open fun <T : Any> ifPresent(value: T?, consumer: Styler.(T) -> Unit): Styler

Applies styling if the given value is not null.

Return

this Styler instance for chaining

Parameters

value

the value to check

consumer

the styling function to apply if value is not null

Type Parameters

T

the type of value