PersistentList<T> (@NotNull Predicate<? super String> isMyBean) { PersistentList<T> result = persistentListOf(); for (Map.Entry<String, PersistentList<T>> entry : explicitExtensions.entrySet()) { String key = entry.getKey(); if (isMyBean.test(key)) { result = result.addAll(entry.getValue()); } } return result; }