Interface BaggageBuilder


public interface BaggageBuilder
A builder of Baggage.
See Also:
  • Method Details

    • put

      BaggageBuilder put(String key, String value, BaggageEntryMetadata entryMetadata)
      Adds the key/value pair and metadata regardless of whether the key is present.
      Parameters:
      key - the String key which will be set.
      value - the String value to set for the given key.
      entryMetadata - the BaggageEntryMetadata metadata to set for the given key.
      Returns:
      this
    • put

      default BaggageBuilder put(String key, String value)
      Adds the key/value pair with empty metadata regardless of whether the key is present.
      Parameters:
      key - the String key which will be set.
      value - the String value to set for the given key.
      Returns:
      this
    • remove

      BaggageBuilder remove(String key)
      Removes the key if it exists.
      Parameters:
      key - the String key which will be removed.
      Returns:
      this
    • build

      Baggage build()
      Creates a Baggage from this builder.
      Returns:
      a Baggage with the same entries as this builder.