public class RemoveTypes extends Object implements Processor
This processor removes key/value pairs from the processed items that have values matching a give set of types. This allows for example to remove all entries from items that are of type `java.lang.Double`.
If an additional pattern of `keys` is provided, then only the matching keys will be checked for removal and any non-matching keys are guaranteed to remain in the item untouched.
| Modifier and Type | Field and Description |
|---|---|
(package private) Class<?>[] |
classes |
(package private) String[] |
keys |
(package private) static org.slf4j.Logger |
log |
(package private) String[] |
types |
| Constructor and Description |
|---|
RemoveTypes() |
static org.slf4j.Logger log
Class<?>[] classes
String[] keys
String[] types
public Data process(Data input)
process in interface ProcessorProcessor.process(stream.Data)protected boolean toRemove(Class<?> type)
public String[] getKeys()
public void setKeys(String[] keys)
keys - the keys to setpublic String[] getTypes()
@Parameter(description="The list of types that are to be removed. Append `[]` to a type to refer to an array of that type.", required=true) public void setTypes(String[] types)
types - the types to setCopyright © 2018. All rights reserved.