entryOrElse

inline fun <T : Any> Provider<ConfigurationNode>.entryOrElse(default: T?, vararg path: String): Provider<T>
inline fun <T : Any> Provider<ConfigurationNode>.entryOrElse(default: Provider<T>?, vararg path: String): Provider<T>

Gets an entry Provider for a value of type T under path, using default as fallback, or requiring config presence if null.

The returned provider will only be stored in a WeakReference in the parent provider.

Throws

if the entry does not exist and default is null

if the entry could not be deserialized to T


inline fun <T : Any> Provider<ConfigurationNode>.entryOrElse(default: T?, vararg paths: Array<String>): Provider<T>
inline fun <T : Any> Provider<ConfigurationNode>.entryOrElse(default: Provider<T>?, vararg paths: Array<String>): Provider<T>

Gets an entry Provider for a value of type T under the first existing path from paths, using default as fallback, or requiring config presence if null.

The returned provider will only be stored in a WeakReference in the parent provider.

Throws

if no entry exists and default is null

if the entry could not be deserialized to T