/** * Creates a subset of the locales from a given array, which are allowed by this locale filter. * @param localeIds the given array. * @return a set of allowed locales. */ public Set<LocaleId> filter(LocaleId ... localeIds) { Set<LocaleId> locales = new HashSet<LocaleId>(); for (LocaleId localeId : localeIds) if (matches(localeId)) locales.add(localeId); return locales; }