|
20 | 20 | import java.util.StringJoiner; |
21 | 21 | import java.util.TreeMap; |
22 | 22 | import java.util.function.BiConsumer; |
23 | | -import java.util.function.Supplier; |
24 | 23 |
|
25 | 24 | import edu.umd.cs.findbugs.annotations.NonNull; |
26 | 25 | import edu.umd.cs.findbugs.annotations.Nullable; |
|
29 | 28 | import io.jooby.ValueNode; |
30 | 29 |
|
31 | 30 | public class HashValue implements ValueNode { |
32 | | - private static final Map<String, ValueNode> EMPTY = Collections.emptyMap(); |
| 31 | + protected static final Map<String, ValueNode> EMPTY = Collections.emptyMap(); |
33 | 32 | private Context ctx; |
34 | | - private Map<String, ValueNode> hash = EMPTY; |
| 33 | + protected Map<String, ValueNode> hash = EMPTY; |
35 | 34 | private final String name; |
36 | 35 | private boolean arrayLike; |
37 | 36 |
|
38 | | - public HashValue(Context ctx, String name, Supplier<Map<String, ValueNode>> mapSupplier) { |
39 | | - this.ctx = ctx; |
40 | | - this.name = name; |
41 | | - this.hash = mapSupplier.get(); |
42 | | - } |
43 | | - |
44 | 37 | public HashValue(Context ctx, String name) { |
45 | 38 | this.ctx = ctx; |
46 | 39 | this.name = name; |
@@ -164,7 +157,7 @@ private boolean isNumber(String value) { |
164 | 157 | return true; |
165 | 158 | } |
166 | 159 |
|
167 | | - private Map<String, ValueNode> hash() { |
| 160 | + protected Map<String, ValueNode> hash() { |
168 | 161 | if (hash == EMPTY) { |
169 | 162 | hash = new LinkedHashMap<>(); |
170 | 163 | } |
|
0 commit comments