ArrangementEntryMatcher () { Collection<ArrangementEntryMatcher> matchers = myMatcherBuilder.buildMatchers(); if (matchers.size() == 1) { return matchers.iterator().next(); } else { CompositeArrangementEntryMatcher result = new CompositeArrangementEntryMatcher(); for (ArrangementEntryMatcher matcher : matchers) { result.addMatcher(matcher); } return result; } }