in locales-utils/src/main/java/com/spotify/i18n/locales/utils/hierarchy/LocalesHierarchyUtils.java [64:74]
public static Set<ULocale> getDescendantLocales(final ULocale locale) {
Preconditions.checkNotNull(locale);
if (isSameLocale(locale, ULocale.ROOT)) {
// Optimization when requesting descendants of ROOT
return AvailableLocalesUtils.getCldrLocales();
} else {
return AvailableLocalesUtils.getCldrLocales().stream()
.filter(ul -> isDescendantLocale(ul, locale))
.collect(Collectors.toSet());
}
}