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.
- 
Method SummaryModifier and TypeMethodDescription<V> voidadd(BiConsumer<T, BiConsumer<String, V>> pairs) Add pairs using the given callback.<E,V> void add(Function<T, Iterable<E>> elementsExtractor, Function<E, String> nameExtractor, Function<E, V> valueExtractor) Add pairs from an iterable.<E,V> void add(Function<T, Iterable<E>> elementsExtractor, JsonWriter.PairExtractor<E> pairExtractor) Add pairs from an iterable.<K,V> void addMapEntries(Function<T, Map<String, V>> extractor) Add pairs from map entries.
- 
Method Details- 
addMapEntriesAdd pairs from map entries.- Type Parameters:
- K- the map key type
- V- the map value type
- Parameters:
- extractor- the extractor used to provide the map
 
- 
addpublic <E,V> void add(Function<T, Iterable<E>> elementsExtractor, JsonWriter.PairExtractor<E> pairExtractor) Add pairs from an iterable.- Type Parameters:
- E- the element type
- V- the value type
- Parameters:
- elementsExtractor- the extractor used to provide the iterable
- pairExtractor- the extractor used to provide the name and value
 
- 
addpublic <E,V> void add(Function<T, Iterable<E>> elementsExtractor, Function<E, String> nameExtractor, Function<E, V> valueExtractor) Add pairs from an iterable.- Type Parameters:
- E- the element type
- V- the value type
- Parameters:
- elementsExtractor- the extractor used to provide the iterable
- nameExtractor- the extractor used to provide the name
- valueExtractor- the extractor used to provide the value
 
- 
addAdd 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
 
 
-