Interface KeyValueProcessor
- All Known Implementing Classes:
HideKeyValueProcessor
,ObjectMapperKeyValueProcessor
,PatternKeyValueProcessor
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
For a given key/value pair, return the processed value as an Optional.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic class
Class representing a value to be processed. -
Method Summary
Modifier and TypeMethodDescriptionstatic KeyValueProcessor
chain
(KeyValueProcessor... processors) Process a chain ofKeyValueProcessor
processors in the order they are added.process
(String key, KeyValueProcessor.Value value) For a given key/value pair, return the processed value as an Optional.
-
Method Details
-
process
For a given key/value pair, return the processed value as an Optional.- Parameters:
key
- the keyvalue
- theKeyValueProcessor.Value
to process- Returns:
- an Optional with the value after processing, which if empty, means there was no value as a result.
-
chain
Process a chain ofKeyValueProcessor
processors in the order they are added.- Parameters:
processors
- a list ofKeyValueProcessor
.- Returns:
- a
KeyValueProcessor
which represents a chain all the passedKeyValueProcessor
-