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
  • Field Details

  • Constructor Details

    • RegistryBuilder

      RegistryBuilder()
  • Method Details

    • 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