List<WebBrowser> (@NotNull Condition<? super WebBrowser> condition, boolean onlyActive) { List<WebBrowser> result = new SmartList<>(); for (ConfigurableWebBrowser browser : browsers) { if ((!onlyActive || browser.isActive()) && condition.value(browser)) { result.add(browser); } } return result; }