mapData

inline fun <T, R> GraphContainer<T>.mapData(transform: (T) -> R): R?(source)

Transforms GraphContainer.data with transform if present, or returns null.

Return

The transformed value, or null when data is null.

Parameters

transform

A mapping function applied to non-null data.