Properties

Link copied to clipboard
val OptionalInput<*>.isPresent: Boolean

true if the input is present

Functions

Link copied to clipboard
infix fun KProperty0<OptionalInput<List<*>>>.ensureDisjoint(otherProperty: KProperty0<OptionalInput<List<*>>>)

Helper function to ensure that two optional lists are disjoint Typically used in an add/remove update context Uses the properties to get the name of the properties to generate the failure message

Link copied to clipboard
inline fun <T> OptionalInput<T>.ifPresent(block: (T) -> Unit)

Executes block with the value if this is OptionalInput.Defined

Link copied to clipboard
fun <T> OptionalInput<T>.orElse(value: T): T

If present, returns its value, otherwise value

Link copied to clipboard
suspend fun <T : Node> OptionalInput<List<TypeMappingInput>>.toMapping(typeRepository: GropiusRepository<T, String>, validator: suspend (T) -> Unit): Map<T, T?>

Transforms a list of gropius.dto.input.common.TypeMappingInput to a mapping using the provided typeRepository