code: public static Map<String, String> toStringMap(final Props props, final boolean localOnly) {
      final HashMap<String, String> map = new HashMap<>();
      final Set<String> keyset = localOnly ? props.localKeySet() : props.getKeySet();
  
      for (final String key : keyset) {
        final String value = props.get(key);
        map.put(key, value);
      }
  
      return map;
    }
docs: Convert props to Map
  
  @param props props
  @param localOnly include local prop sets only or not
  @return String Map of props