added copy and fixed cleaning of semicolons

This commit is contained in:
gnembon committed 2019-11-04 00:35:32 -04:00
1 parent e2c614c6de
commit efb87c8497
7 files changed
+86 -17

No files matched your search

@@ -63,6 +63,15 @@ public class MapValue extends AbstractListValue implements ContainerValueInterfa
{
return new MapValue(map);
}
@Override
public Value deepcopy()
{
Map<Value, Value> copyMap = new HashMap<>();
map.forEach((key, value) -> copyMap.put(key.deepcopy(), value.deepcopy()));
return new MapValue(copyMap);
}
public MapValue(Map<Value,Value> other)
{
map = new HashMap<>(other);