File tree 1 file changed +12
-2
lines changed
core-api/src/main/java/com/optimizely/ab/config/parser
1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,16 @@ public static ConfigParser getInstance() {
38
38
}
39
39
40
40
//======== Helper methods ========//
41
+ @ FunctionalInterface
42
+ public interface ParserSupplier {
43
+
44
+ /**
45
+ * Gets a result.
46
+ *
47
+ * @return a result
48
+ */
49
+ ConfigParser get ();
50
+ }
41
51
42
52
public enum ConfigParserSupplier {
43
53
// WARNING THESE MUST REMAIN LAMBDAS!!!
@@ -49,9 +59,9 @@ public enum ConfigParserSupplier {
49
59
JSON_SIMPLE_CONFIG_PARSER ("org.json.simple.JSONObject" , () -> { return new JsonSimpleConfigParser (); });
50
60
51
61
private final String className ;
52
- private final Supplier < ConfigParser > supplier ;
62
+ private final ParserSupplier supplier ;
53
63
54
- ConfigParserSupplier (String className , Supplier < ConfigParser > supplier ) {
64
+ ConfigParserSupplier (String className , ParserSupplier supplier ) {
55
65
this .className = className ;
56
66
this .supplier = supplier ;
57
67
}
You can’t perform that action at this time.
0 commit comments