Class ArrayBasedTraceState

    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Map<java.lang.String,​java.lang.String> asMap()
      Returns a read-only view of this TraceState as a Map.
      (package private) static ArrayBasedTraceState create​(java.util.List<java.lang.String> entries)  
      void forEach​(java.util.function.BiConsumer<java.lang.String,​java.lang.String> consumer)
      Iterates over all the key-value entries contained in this TraceState.
      java.lang.String get​(java.lang.String key)
      Returns the value to which the specified key is mapped, or null if this map contains no mapping for the key.
      (package private) abstract java.util.List<java.lang.String> getEntries()  
      boolean isEmpty()
      Returns whether this TraceState is empty, containing no entries.
      int size()
      Returns the number of entries in this TraceState.
      TraceStateBuilder toBuilder()
      Returns a Builder based on this TraceState.
      • Methods inherited from class java.lang.Object

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

      • ArrayBasedTraceState

        ArrayBasedTraceState()
    • Method Detail

      • get

        @Nullable
        public java.lang.String get​(java.lang.String key)
        Description copied from interface: TraceState
        Returns the value to which the specified key is mapped, or null if this map contains no mapping for the key.
        Specified by:
        get in interface TraceState
        Parameters:
        key - with which the specified value is to be associated
        Returns:
        the value to which the specified key is mapped, or null if this map contains no mapping for the key.
      • isEmpty

        public boolean isEmpty()
        Description copied from interface: TraceState
        Returns whether this TraceState is empty, containing no entries.
        Specified by:
        isEmpty in interface TraceState
      • forEach

        public void forEach​(java.util.function.BiConsumer<java.lang.String,​java.lang.String> consumer)
        Description copied from interface: TraceState
        Iterates over all the key-value entries contained in this TraceState.
        Specified by:
        forEach in interface TraceState
      • asMap

        public java.util.Map<java.lang.String,​java.lang.String> asMap()
        Description copied from interface: TraceState
        Returns a read-only view of this TraceState as a Map.
        Specified by:
        asMap in interface TraceState
      • getEntries

        abstract java.util.List<java.lang.String> getEntries()
      • toBuilder

        public TraceStateBuilder toBuilder()
        Description copied from interface: TraceState
        Returns a Builder based on this TraceState.
        Specified by:
        toBuilder in interface TraceState
        Returns:
        a Builder based on this TraceState.