ServersTreeNodeSelector (ServerConnection<?> connection) { for (Pair<ServersTreeNodeSelector, Condition<ServerConnection<?>>> pair : mySelectors) { if (pair.second.value(connection)) { return pair.first; } } return null; }