org.apache.hc.core5.http.config

## Class RegistryBuilder<I>

- java.lang.Object
- - org.apache.hc.core5.http.config.RegistryBuilder<I>

- Type Parameters:
    `I` - the type of Registry values.

      public final class RegistryBuilder<I>
      extends Object

  Builder for `Registry` instances.
  Since:
    4.3

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Registry<I>` | `build()` Creates a new Registry with the registered items.
    `static <I> RegistryBuilder<I>` | `create()` Creates a new RegistryBuilder.
    `RegistryBuilder<I>` | `register(String id, I item)` Registers the given item for the given ID.
    `String` | `toString()`

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

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

- - ### Method Detail

    - #### create

          public static <I> RegistryBuilder<I> create()

      Creates a new RegistryBuilder.
      Type Parameters:
        `I` - the type of Registry values.
      Returns:
        a new RegistryBuilder.

    - #### register

          public RegistryBuilder<I> register(String id,
                                             I item)

      Registers the given item for the given ID.
      Parameters:
        `id` - The ID key, converted to lower-case.
        `item` - The item to register.
      Returns:
        this instance.

    - #### build

          public Registry<I> build()

      Creates a new Registry with the registered items.
      Returns:
        a new Registry with the registered items.

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2005–2021 The Apache Software Foundation. All rights reserved.