File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
src/main/java/com/annimon/ownlang/lib Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 11package com .annimon .ownlang .lib ;
22
33import com .annimon .ownlang .exceptions .TypeException ;
4- import java .util .HashMap ;
54import java .util .Iterator ;
5+ import java .util .LinkedHashMap ;
66import java .util .Map ;
77import java .util .Objects ;
88import java .util .function .Consumer ;
@@ -25,7 +25,7 @@ public static MapValue merge(MapValue map1, MapValue map2) {
2525 private final Map <Value , Value > map ;
2626
2727 public MapValue (int size ) {
28- this .map = new HashMap <>(size );
28+ this .map = new LinkedHashMap <>(size );
2929 }
3030
3131 public MapValue (Map <Value , Value > map ) {
@@ -84,6 +84,10 @@ public void set(String key, Function function) {
8484 public void set (Value key , Value value ) {
8585 map .put (key , value );
8686 }
87+
88+ public Map <Value , Value > getMap () {
89+ return map ;
90+ }
8791
8892 @ Override
8993 public Object raw () {
You can’t perform that action at this time.
0 commit comments