/** * Start building a setting with a specified default value. * * @param name of the setting, e.g. "dbms.transaction.timeout". * @param parser that will convert the string representation to the concrete type T. * @param defaultValue the string representation of the default value. * @param <T> the concrete type of the setting. */ @Nonnull public static <T> SettingBuilder<T> buildSetting( @Nonnull final String name, @Nonnull final Function<String,T> parser, @Nullable final String defaultValue ) { return new SettingBuilder<>( name, parser, defaultValue ); }
/** * Constructs a {@link Setting} with a specified default value. * * @param name of the setting, e.g. "dbms.transaction.timeout". * @param parser that will convert the string representation to the concrete type T. * @param defaultValue the string representation of the default value. * @param <T> the concrete type of the setting. */ @Nonnull public static <T> Setting<T> setting( @Nonnull final String name, @Nonnull final Function<String,T> parser, @Nullable final String defaultValue ) { return new SettingBuilder<>( name, parser, defaultValue ).build(); }
/** * Start building a setting with a specified default value. * * @param name of the setting, e.g. "dbms.transaction.timeout". * @param parser that will convert the string representation to the concrete type T. * @param defaultValue the string representation of the default value. * @param <T> the concrete type of the setting. */ @Nonnull public static <T> SettingBuilder<T> buildSetting( @Nonnull final String name, @Nonnull final Function<String,T> parser, @Nullable final String defaultValue ) { return new SettingBuilder<>( name, parser, defaultValue ); }
/** * Constructs a {@link Setting} with a specified default value. * * @param name of the setting, e.g. "dbms.transaction.timeout". * @param parser that will convert the string representation to the concrete type T. * @param defaultValue the string representation of the default value. * @param <T> the concrete type of the setting. */ @Nonnull public static <T> Setting<T> setting( @Nonnull final String name, @Nonnull final Function<String,T> parser, @Nullable final String defaultValue ) { return new SettingBuilder<>( name, parser, defaultValue ).build(); }