/** * @param baseName the base name of the default locale's bundle. * @param locales the set of all allowed locales. */ public EditableResourceBundleSet(String baseName, Collection<Locale> locales) { // The locales are sorted by language, country, then variant. SortedSet<Locale> modifiableSet = new TreeSet<Locale>(LocaleComparator.getInstance()); modifiableSet.addAll(locales); this.baseName = baseName; this.locales = AoCollections.optimalUnmodifiableSortedSet(modifiableSet); }
private ServiceSet( Service template, Set<Service> services ) { this.template = template; this.services = AoCollections.optimalUnmodifiableSet(services); SortedSet<Target> newTargets = new TreeSet<Target>(); for(Service service : services) { newTargets.addAll(service.getTargets()); } this.targets = AoCollections.optimalUnmodifiableSortedSet(newTargets); }
this.targets = AoCollections.optimalUnmodifiableSortedSet(newTargets);