| 426 | * @see ZoneNameProvider#getPreferredIDs(Locale, boolean) |
| 427 | */ |
| 428 | public static Set<TZID> getPreferredIDs( |
| 429 | Locale locale, |
| 430 | boolean smart, |
| 431 | String provider |
| 432 | ) { |
| 433 | |
| 434 | ZoneModelProvider zp = getProvider(provider); |
| 435 | |
| 436 | if (zp == null) { |
| 437 | return Collections.emptySet(); |
| 438 | } |
| 439 | |
| 440 | ZoneNameProvider np = zp.getSpecificZoneNameRepository(); |
| 441 | |
| 442 | if (np == null) { |
| 443 | np = NAME_PROVIDER; |
| 444 | } |
| 445 | |
| 446 | Set<TZID> p = new HashSet<>(); |
| 447 | |
| 448 | for (String id : np.getPreferredIDs(locale, smart)) { |
| 449 | p.add(resolve(id)); |
| 450 | } |
| 451 | |
| 452 | return Collections.unmodifiableSet(p); |
| 453 | |
| 454 | } |
| 455 | |
| 456 | /** |
| 457 | * <p>Gets the system timezone. </p> |