Package com.lokalized

Class DefaultStrings.Builder

java.lang.Object
com.lokalized.DefaultStrings.Builder
Enclosing class:
DefaultStrings

@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.

Author:
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.

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