class Util {

    public static List<SchemaPath> expandQname(final List<SchemaPath> list, final Pattern pattern) {
        final List<SchemaPath> matchingQnames = new ArrayList<>();

        for (final SchemaPath notification : list) {
            final String namespace = notification.getLastComponent().getNamespace().toString();
            if (pattern.matcher(namespace).matches()) {
                matchingQnames.add(notification);
            }
        }
        return matchingQnames;
    }

    private  Util();

}