/** * Get the first (most qualified) {@link Locale} using the {@link #ACCEPT_LANGUAGE} header, if present. * @return The first (most qualified) {@link Locale} using the {@link #ACCEPT_LANGUAGE} header, if available */ default Optional<Locale> getLocale() { final List<Locale> locales = getLocales(); return (!locales.isEmpty()) ? Optional.ofNullable(locales.get(0)) : Optional.empty(); }