Class ULocale.DefaultCategoryState

java.lang.Object
com.ibm.icu.util.ULocale.DefaultCategoryState
Enclosing class:
ULocale

private static final class ULocale.DefaultCategoryState extends Object
Holds the per-category default Locale and ULocale arrays as a single volatile snapshot. This avoids the TOCTOU race of reading two separate volatile arrays (one could be swapped between reads). All writes do copy-on-write: clone arrays, modify, publish new snapshot via volatile write.
  • Field Details

    • locales

      final Locale[] locales
    • ulocales

      final ULocale[] ulocales
  • Constructor Details

    • DefaultCategoryState

      DefaultCategoryState(Locale[] locales, ULocale[] ulocales)