code: public Map<String, String> getMapByPrefix(final String prefix) {
      final Map<String, String> values = (this._parent == null)
          ? new HashMap<>()
          : this._parent.getMapByPrefix(prefix);
  
      // when there is a conflict, value from the child takes the priority.
      if (prefix == null) { // when prefix is null, return an empty map
        return values;
      }
  
      for (final String key : this.localKeySet()) {
        if (key != null && key.length() >= prefix.length()) {
          if (key.startsWith(prefix)) {
            values.put(key.substring(prefix.length()), get(key));
          }
        }
      }
      return values;
    }
docs: Get a new de-duplicated map of all the flattened properties by given prefix. The prefix will
  be removed in the return map's keySet.
  
  @param prefix the prefix string
  @return a new constructed de-duplicated HashMap of all properties (including parents'
  properties) with the give prefix