blob: 53f3d026817377d45f39f37b5062f07f3855e8a1 [file] [log] [blame]
Pierre De Rop11527502016-02-18 21:07:16 +00001package org.apache.felix.dm.lambda.callbacks;
2
3import java.util.Dictionary;
4import java.util.Objects;
5
6/**
7 * Represents a callback(Dictionary) on an Object instance.
8 *
9 * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
10 */
11@FunctionalInterface
12public interface InstanceCbDictionary {
13 /**
14 * Handles the given argument.
15 * @param conf the properties
16 */
17 void accept(Dictionary<String, Object> conf);
18
19 default InstanceCbDictionary andThen(InstanceCbDictionary after) {
20 Objects.requireNonNull(after);
21 return (Dictionary<String, Object> conf) -> {
22 accept(conf);
23 after.accept(conf);
24 };
25 }
26}