Interface Baggage

All Known Subinterfaces:
WritableBaggage

public interface Baggage
Behavior common to all baggage implementations.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Returns whether the specified key is present in the baggage.
    get(String key)
    Returns the value for the specified baggage key.
    Returns the keys present in the baggage.
  • Method Details

    • get

      Optional<String> get(String key)
      Returns the value for the specified baggage key.
      Parameters:
      key - key for the value to retrieve
      Returns:
      Optional of the value for the key; Optional.empty() if absent.
    • keys

      Set<String> keys()
      Returns the keys present in the baggage.
      Returns:
      set of key names; empty if none.
    • containsKey

      boolean containsKey(String key)
      Returns whether the specified key is present in the baggage.
      Parameters:
      key - key name to check
      Returns:
      true if the baggage contains an entry for the specified key; false otherwise