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
Nested ClassesModifier and TypeInterfaceDescriptionstatic classClass representing a value to be processed. -
Method Summary
Modifier and TypeMethodDescriptionstatic KeyValueProcessorchain(KeyValueProcessor... processors) Process a chain ofKeyValueProcessorprocessors 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.Valueto process- Returns:
- an Optional with the value after processing, which if empty, means there was no value as a result.
-
chain
Process a chain ofKeyValueProcessorprocessors in the order they are added.- Parameters:
processors- a list ofKeyValueProcessor.- Returns:
- a
KeyValueProcessorwhich represents a chain all the passedKeyValueProcessor
-