/** * Return the value associated with the setting. * * @param setting a setting * @param <T> setting value type * @return the value associated with the setting * @throws com.hotels.styx.api.configuration.NoSystemPropertyDefined if there is no associated value */ public static <T> T valueOf(Setting<T> setting) { return setting.value().orElseThrow(() -> new NoSystemPropertyDefined(setting.name())); }