Class ContextPairs.Pairs<T>
java.lang.Object
org.springframework.boot.logging.structured.ContextPairs.Pairs<T>
- Type Parameters:
 T- the item type
- Enclosing class:
 ContextPairs
Callback used to add pairs.
- Since:
 - 3.5.0
 - Author:
 - Phillip Webb
 
- 
Method Summary
Modifier and TypeMethodDescription<V> voidadd(BiConsumer<T, BiConsumer<String, V>> pairs) Add pairs using the given callback.<E,V> void add(Function<T, @Nullable Iterable<E>> elementsExtractor, Function<E, String> nameExtractor, Function<E, V> valueExtractor) Add pairs from an iterable.<E> voidadd(Function<T, @Nullable Iterable<E>> elementsExtractor, JsonWriter.PairExtractor<E> pairExtractor) Add pairs from an iterable.<V> voidaddMapEntries(Function<T, Map<String, V>> extractor) Add pairs from map entries. 
- 
Method Details
- 
addMapEntries
 - 
add
public <E> void add(Function<T, @Nullable Iterable<E>> elementsExtractor, JsonWriter.PairExtractor<E> pairExtractor) Add pairs from an iterable.- Type Parameters:
 E- the element type- Parameters:
 elementsExtractor- the extractor used to provide the iterablepairExtractor- the extractor used to provide the name and value
 - 
add
public <E,V> void add(Function<T, @Nullable Iterable<E>> elementsExtractor, Function<E, String> nameExtractor, Function<E, V> valueExtractor) Add pairs from an iterable.- Type Parameters:
 E- the element typeV- the value type- Parameters:
 elementsExtractor- the extractor used to provide the iterablenameExtractor- the extractor used to provide the namevalueExtractor- the extractor used to provide the value
 - 
add
Add pairs using the given callback.- Type Parameters:
 V- the value type- Parameters:
 pairs- callback provided with the item and consumer that can be called to actually add the pairs
 
 -