class PropertiesExt {

    public static Map<String, String> getPropertiesOf(String namePrefix, Map<String, String> properties) {
        if (CollectionsExt.isNullOrEmpty(properties)) {
            return Collections.emptyMap();
        }
        String namePrefixWithDot = namePrefix + '.';
        Map<String, String> result = new HashMap<>();
        for (Map.Entry<String, String> entry : properties.entrySet()) {
            String name = entry.getKey().trim();
            if (name.isEmpty() || !name.startsWith(namePrefixWithDot)) {
                continue;
            }
            String internalName = name.substring(namePrefixWithDot.length());
            result.put(internalName, entry.getValue());
        }
        return result;
    }

    private  PropertiesExt();

}