public static Map<String,Slice> loadAllFromMap(Map<String,Object> genericSlices){
  if (genericSlices == null)   return Collections.emptyMap();
  Map<String,Slice> result=new LinkedHashMap<>(genericSlices.size());
  for (  Map.Entry<String,Object> entry : genericSlices.entrySet()) {
    String name=entry.getKey();
    Object val=entry.getValue();
    if (val instanceof Slice) {
      result.put(name,(Slice)val);
    }
 else     if (val instanceof Map) {
      result.put(name,new Slice(name,null,(Map<String,Object>)val));
    }
  }
  return result;
}

public static Map < String , Slice > loadAllFromMap ( Map < String , Object > genericSlices ) { if ( genericSlices == null ) return Collections . emptyMap ( ) ; Map < String , Slice > result = new LinkedHashMap < > ( genericSlices . size ( ) ) ; for ( Map . Entry < String , Object > entry : genericSlices . entrySet ( ) ) { String name = entry . getKey ( ) ; Object val = entry . getValue ( ) ; if ( val instanceof Slice ) { result . put ( name , ( Slice ) val ) ; } else if ( val instanceof Map ) { result . put ( name , new Slice ( name , null , ( Map < String , Object > ) val ) ) ; } } return result ; }
loads multiple slices into a map from a generic map that probably came from deserialized json .
