Package org.springframework.boot.json
Interface JsonWriter.PairExtractor<E>
- Type Parameters:
- E- the element type
- Enclosing interface:
- JsonWriter<T>
public static interface JsonWriter.PairExtractor<E>
Interface that can be used to extract name/value pairs from an element.
- 
Method SummaryModifier and TypeMethodDescription<N> NExtract the name.<V> VExtract the name.static <T> JsonWriter.PairExtractor<T>Factory method to create aJsonWriter.PairExtractorusing distinct name and value extraction functions.
- 
Method Details- 
getNameExtract the name.- Type Parameters:
- N- the name type
- Parameters:
- element- the source element
- Returns:
- the extracted name
 
- 
getValueExtract the name.- Type Parameters:
- V- the value type
- Parameters:
- element- the source element
- Returns:
- the extracted value
 
- 
ofstatic <T> JsonWriter.PairExtractor<T> of(Function<T, ?> nameExtractor, Function<T, ?> valueExtractor) Factory method to create aJsonWriter.PairExtractorusing distinct name and value extraction functions.- Type Parameters:
- T- the element type
- Parameters:
- nameExtractor- the name extractor
- valueExtractor- the value extraction
- Returns:
- a new JsonWriter.PairExtractorinstance
 
 
-