org.apache.tamaya.builder

## Class PropertySourceBuilder

- java.lang.Object
- - org.apache.tamaya.builder.PropertySourceBuilder

-     public final class PropertySourceBuilder
      extends Object

  Simple builder for building a `PropertySource`.

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `PropertySource` | `build()` Creates a new immutable `PropertySource` instance.
    `static PropertySourceBuilder` | `from(String name)` Gets a new instance of a builder.
    `static PropertySourceBuilder` | `of(String name)` Gets a new instance of a builder.
    `PropertySourceBuilder` | `put(String key, String value)` Sets a new property key/value.
    `PropertySourceBuilder` | `putAll(Map<String,String> values)` Put all the given key, values.
    `PropertySourceBuilder` | `putAll(PropertySource propertySource)` Puts all values from the given property source.
    `String` | `toString()`
    `PropertySourceBuilder` | `withOrdinal(int ordinal)` Sets the ordinal to be used explicitly (instead evaluating it using `tamaya.ordinal`.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Method Detail

    - #### of

          public static PropertySourceBuilder of(String name)

      Gets a new instance of a builder.
      Parameters:
        `name` - The name of the property source, not null.
      Returns:
        a new instance.

    - #### from

          public static PropertySourceBuilder from(String name)

      Gets a new instance of a builder.
      Parameters:
        `name` - The name of the property source, not null.
      Returns:
        a new instance.

    - #### put

          public PropertySourceBuilder put(String key,
                                           String value)

      Sets a new property key/value.
      Parameters:
        `key` - the property key, not null.
        `value` - the property value, not null.
      Returns:
        the bulder for chaining.

    - #### putAll

          public PropertySourceBuilder putAll(Map<String,String> values)

      Put all the given key, values.
      Parameters:
        `values` - the new key/values, not null.
      Returns:
        the bulder for chaining.

    - #### withOrdinal

          public PropertySourceBuilder withOrdinal(int ordinal)

      Sets the ordinal to be used explicitly (instead evaluating it using `tamaya.ordinal`.
      Parameters:
        `ordinal` - the explicit ordinal to be used.
      Returns:
        the bulder for chaining.

    - #### putAll

          public PropertySourceBuilder putAll(PropertySource propertySource)

      Puts all values from the given property source.
      Parameters:
        `propertySource` - the property source, not null.
      Returns:
        the bulder for chaining.

    - #### build

          public PropertySource build()

      Creates a new immutable `PropertySource` instance.
      Returns:
        a new immutable `PropertySource` instance, never null.

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2015 Apache Software Foundation. All rights reserved.