Class ImmutableBaggage.Builder

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.List<java.lang.Object> data  
    • Constructor Summary

      Constructors 
      Constructor Description
      Builder()  
      Builder​(java.util.List<java.lang.Object> data)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Baggage build()
      Creates a Baggage from this builder.
      BaggageBuilder put​(java.lang.String key, java.lang.String value, BaggageEntryMetadata entryMetadata)
      Adds the key/value pair and metadata regardless of whether the key is present.
      BaggageBuilder remove​(java.lang.String key)
      Removes the key if it exists.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • data

        private final java.util.List<java.lang.Object> data
    • Constructor Detail

      • Builder

        Builder()
      • Builder

        Builder​(java.util.List<java.lang.Object> data)
    • Method Detail

      • put

        public BaggageBuilder put​(java.lang.String key,
                                  java.lang.String value,
                                  BaggageEntryMetadata entryMetadata)
        Description copied from interface: BaggageBuilder
        Adds the key/value pair and metadata regardless of whether the key is present.
        Specified by:
        put in interface BaggageBuilder
        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
      • remove

        public BaggageBuilder remove​(java.lang.String key)
        Description copied from interface: BaggageBuilder
        Removes the key if it exists.
        Specified by:
        remove in interface BaggageBuilder
        Parameters:
        key - the String key which will be removed.
        Returns:
        this
      • build

        public Baggage build()
        Description copied from interface: BaggageBuilder
        Creates a Baggage from this builder.
        Specified by:
        build in interface BaggageBuilder
        Returns:
        a Baggage with the same entries as this builder.