Interface RuntimeProperties.ConfigurationBuilder<C extends RuntimeProperties, B extends RuntimeProperties.ConfigurationBuilder<C,B>>

All Known Implementing Classes:
RuntimeProperties.Builder
Enclosing interface:
RuntimeProperties

public static interface RuntimeProperties.ConfigurationBuilder<C extends RuntimeProperties, B extends RuntimeProperties.ConfigurationBuilder<C,B>>
  • Method Summary

    Modifier and Type
    Method
    Description
    apply(Consumer<B> function)
    Apply the function to this builder.
    Build and return the immutable configuration.
    default B
    with(String key, boolean value)
    Associate the given value with the specified key.
    default B
    with(String key, double value)
    Associate the given value with the specified key.
    default B
    with(String key, float value)
    Associate the given value with the specified key.
    default B
    with(String key, int value)
    Associate the given value with the specified key.
    default B
    with(String key, long value)
    Associate the given value with the specified key.
    default B
    with(String key, Class<?> value)
    Associate the given class name value with the specified key.
    default B
    with(String key, Object value)
    Associate the given value with the specified key.
    with(String key, String value)
    Associate the given value with the specified key.
    default B
    Add all of the fields in the supplied Configuration object.
    Remove the value associated with the specified key.
  • Method Details

    • build

      C build()
      Build and return the immutable configuration.
      Returns:
      the immutable configuration; never null
    • with

      B with(String key, String value)
      Associate the given value with the specified key.
      Parameters:
      key - the key
      value - the value
      Returns:
      this builder object so methods can be chained together; never null
    • apply

      B apply(Consumer<B> function)
      Apply the function to this builder.
      Parameters:
      function - the predefined field for the key
      Returns:
      this builder object so methods can be chained together; never null
    • without

      B without(String key)
      Remove the value associated with the specified key.
      Parameters:
      key - the key
      Returns:
      this builder object so methods can be chained together; never null
    • with

      default B with(RuntimeProperties other)
      Add all of the fields in the supplied Configuration object.
      Parameters:
      other - the configuration whose fields should be added; may not be null
      Returns:
      this builder object so methods can be chained together; never null
    • with

      default B with(String key, int value)
      Associate the given value with the specified key.
      Parameters:
      key - the key
      value - the value
      Returns:
      this builder object so methods can be chained together; never null
    • with

      default B with(String key, float value)
      Associate the given value with the specified key.
      Parameters:
      key - the key
      value - the value
      Returns:
      this builder object so methods can be chained together; never null
    • with

      default B with(String key, double value)
      Associate the given value with the specified key.
      Parameters:
      key - the key
      value - the value
      Returns:
      this builder object so methods can be chained together; never null
    • with

      default B with(String key, long value)
      Associate the given value with the specified key.
      Parameters:
      key - the key
      value - the value
      Returns:
      this builder object so methods can be chained together; never null
    • with

      default B with(String key, boolean value)
      Associate the given value with the specified key.
      Parameters:
      key - the key
      value - the value
      Returns:
      this builder object so methods can be chained together; never null
    • with

      default B with(String key, Class<?> value)
      Associate the given class name value with the specified key.
      Parameters:
      key - the key
      value - the Class value
      Returns:
      this builder object so methods can be chained together; never null
    • with

      default B with(String key, Object value)
      Associate the given value with the specified key.
      Parameters:
      key - the key
      value - the value
      Returns:
      this builder object so methods can be chained together; never null