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.
@FunctionalInterface public interface KeyValueProcessor
For a given key/value pair, return the processed value as an Optional.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classKeyValueProcessor.ValueClass representing a value to be processed.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static KeyValueProcessorchain(KeyValueProcessor... processors)Process a chain ofKeyValueProcessorprocessors in the order they are added.Optional<KeyValueProcessor.Value>process(String key, KeyValueProcessor.Value value)For a given key/value pair, return the processed value as an Optional.
-
-
-
Method Detail
-
process
Optional<KeyValueProcessor.Value> process(String key, KeyValueProcessor.Value value)
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
static KeyValueProcessor chain(KeyValueProcessor... processors)
Process a chain ofKeyValueProcessorprocessors in the order they are added.- Parameters:
processors- a list ofKeyValueProcessor.- Returns:
- a
KeyValueProcessorwhich represents a chain all the passedKeyValueProcessor
-
-