class ScanAttribute extends AbstractProcessor {

    private boolean allMatch(final FlowFile flowFile, final Pattern attributePattern, final Set<String> dictionary) {
        for (final Map.Entry<String, String> entry : flowFile.getAttributes().entrySet()) {
            if (attributePattern == null || attributePattern.matcher(entry.getKey()).matches()) {
                if (!dictionary.contains(entry.getValue())) {
                    return false;
                }
            }
        }

        return true;
    }

}