Mike
Lifetime Supporter
I don't know about Tom using a laptop but I can imagine him in his Saturday Night Fever bell bottoms cutting the rug in his garage listening to the BeeGees! Ha
I'm confused, are we talking mutable or immutable Maps? What is recursion anyway? I hope my old brain doesn't burn out anytime soon or I'll be living under a bridge in a van(with a carburetor).
private Object deepCopy(Object object) {
I'm confused, are we talking mutable or immutable Maps? What is recursion anyway? I hope my old brain doesn't burn out anytime soon or I'll be living under a bridge in a van(with a carburetor).
private Object deepCopy(Object object) {
try {
catch (Exception e) {
}if(object instanceof Boolean) return new Boolean(((Boolean) object).booleanValue());
if(object instanceof String) return new String(object.toString());
if(object instanceof Map) {
return null;
}if(object instanceof String) return new String(object.toString());
if(object instanceof Map) {
ImmutableMap.Builder<String, Object> builder = ImmutableMap.builder();
Map<String, Object> entries = (Map)object;
entries.forEach((key, value) -> builder.put(key, deepCopy(value)));
return builder.build();
}Map<String, Object> entries = (Map)object;
entries.forEach((key, value) -> builder.put(key, deepCopy(value)));
return builder.build();
return null;
catch (Exception e) {
e.printStackTrace();
return null;
return null;