@Override public Iterator<Locale> getSupportedLocales() { return delegate().getSupportedLocales(); }
/** * {@inheritDoc} */ public Iterator<Locale> getSupportedLocales() { return wrapped.getSupportedLocales(); }
/** * {@inheritDoc} */ public Iterator<Locale> getSupportedLocales() { return wrapped.getSupportedLocales(); }
/** * {@inheritDoc} */ public Iterator<Locale> getSupportedLocales() { return wrapped.getSupportedLocales(); }
@Override public Iterator getSupportedLocales() { return application.getSupportedLocales(); }
@Override public Iterator<Locale> getSupportedLocales() { return this.wrappedApplication.getSupportedLocales(); }
private Set<Locale> getCurrentLocales(Application application) { // noinspection CollectionWithoutInitialCapacity Set<Locale> supportedLocales = new HashSet<>(); for (Iterator<Locale> i = application.getSupportedLocales(); i.hasNext();) { supportedLocales.add(i.next()); } return supportedLocales; }
private Set<Locale> getCurrentLocales(Application application) { //noinspection CollectionWithoutInitialCapacity Set<Locale> supportedLocales = new HashSet<Locale>(); for (Iterator<Locale> i = application.getSupportedLocales(); i.hasNext();) { supportedLocales.add(i.next()); } return supportedLocales; }
private Set<Locale> getCurrentLocales(Application application) { //noinspection CollectionWithoutInitialCapacity Set<Locale> supportedLocales = new HashSet<Locale>(); for (Iterator<Locale> i = application.getSupportedLocales(); i.hasNext();) { supportedLocales.add(i.next()); } return supportedLocales; }
private Set<Locale> getCurrentLocales(Application application) { // noinspection CollectionWithoutInitialCapacity Set<Locale> supportedLocales = new HashSet<>(); for (Iterator<Locale> i = application.getSupportedLocales(); i.hasNext();) { supportedLocales.add(i.next()); } return supportedLocales; }
private Set<Locale> getCurrentLocales(Application application) { // noinspection CollectionWithoutInitialCapacity Set<Locale> supportedLocales = new HashSet<>(); for (Iterator<Locale> i = application.getSupportedLocales(); i.hasNext();) { supportedLocales.add(i.next()); } return supportedLocales; }
@Override public Iterator<Locale> getSupportedLocales() { return getWrapped().getSupportedLocales(); }
/** * <p class="changed_added_2_0">The default behavior of this method * is to call {@link Application#getSupportedLocales} on the * wrapped {@link Application} object.</p> */ @Override public Iterator<Locale> getSupportedLocales() { return getWrapped().getSupportedLocales(); }
/** * <p class="changed_added_2_0"> * The default behavior of this method is to call {@link Application#getSupportedLocales} on the * wrapped {@link Application} object. * </p> */ @Override public Iterator<Locale> getSupportedLocales() { return getWrapped().getSupportedLocales(); }
/** * <p class="changed_added_2_0">The default behavior of this method * is to call {@link Application#getSupportedLocales} on the * wrapped {@link Application} object.</p> */ @Override public Iterator<Locale> getSupportedLocales() { return getWrapped().getSupportedLocales(); }
/** * <p class="changed_added_2_0"> * The default behavior of this method is to call {@link Application#getSupportedLocales} on the * wrapped {@link Application} object. * </p> */ @Override public Iterator<Locale> getSupportedLocales() { return getWrapped().getSupportedLocales(); }
/** * <p class="changed_added_2_0"> * The default behavior of this method is to call {@link Application#getSupportedLocales} on the * wrapped {@link Application} object. * </p> */ @Override public Iterator<Locale> getSupportedLocales() { return getWrapped().getSupportedLocales(); }
@Override public Iterator<Locale> getSupportedLocales() { return delegate().getSupportedLocales(); }
public void setLocaleCode(String localeCode) { Iterator<Locale> locales = FacesContext.getCurrentInstance().getApplication().getSupportedLocales(); while (locales.hasNext()) { Locale locale = locales.next(); if (!Strings.isEmpty(locale.getLanguage()) && locale.getLanguage().equals(localeCode)) { this.localeCode = localeCode; FacesContext.getCurrentInstance().getViewRoot().setLocale(new Locale(localeCode)); setCookieValue(localeCode); break; } } }
@Test public void testReturnsSupportedLocales() { new MockFacesContext().set(); FacesContext ctx = FacesContext.getCurrentInstance(); Iterator<Locale> supportedLocales = ctx.getApplication().getSupportedLocales(); List<Locale> supportedLocales2 = new LocaleProducer().getSupportedLocales(ctx); assertArrayEquals(toArray(supportedLocales), toArray(supportedLocales2.iterator())); }