Package com.lokalized

Class DefaultStrings.Builder

Enclosing class:

@NotThreadSafe public static class DefaultStrings.Builder extends Object
Builder used to construct instances of DefaultStrings.

You cannot provide both a localeSupplier and a languageRangesSupplier - you must choose one or neither.

This class is intended for use by a single thread.

Mark Allen
  • Constructor Details

    • Builder

      public Builder(@Nonnull String fallbackLanguageCode, @Nonnull Supplier<Map<Locale,? extends Iterable<LocalizedString>>> localizedStringSupplier)
      Constructs a strings builder with a default language code and localized string supplier.

      The fallback language code must be an ISO 639 alpha-2 or alpha-3 language code. When a language has both an alpha-2 code and an alpha-3 code, the alpha-2 code must be used.

      fallbackLanguageCode - fallback language code, not null
      localizedStringSupplier - supplier of localized strings, not null
  • Method Details