test_class.file: gazeplay-commons/src/test/java/net/gazeplay/commons/utils/multilinguism/LanguagesTest.java
test_class.identifier: LanguagesTest
test_case.body: @Test
      void shouldGetValidLocale() {
          LanguageDetails result = Languages.getLocale(new Locale("eng", "GB"));
          assertEquals("English", result.getLabel());
          assertTrue(result.getFlags().get(0).contains("Flag_of_the_United_Kingdom"));
      }
test_case.class_method_signature: LanguagesTest.shouldGetValidLocale()
test_case.full_signature: @Test void shouldGetValidLocale()
test_case.identifier: shouldGetValidLocale
test_case.invocations: getLocale assertEquals getLabel assertTrue contains get getFlags
test_case.modifiers: @Test
test_case.parameters: ()
test_case.return: void
test_case.signature: void shouldGetValidLocale()
focal_class.declarator: languageMap = Collections.unmodifiableSortedMap(createLanguagesMap())
focal_class.modifier: private static final
focal_class.original_string: private static final SortedMap<Locale, LanguageDetails> languageMap = Collections.unmodifiableSortedMap(createLanguagesMap());
focal_class.type: SortedMap<Locale, LanguageDetails>
focal_class.var_name: languageMap
focal_class.declarator: DEFAULT_CODE = new Locale("fra", "FR")
focal_class.modifier: private static final
focal_class.original_string: private static final Locale DEFAULT_CODE = new Locale("fra", "FR");
focal_class.type: Locale
focal_class.var_name: DEFAULT_CODE
focal_class.declarator: flagsPath = "data/common/flags/"
focal_class.modifier: private static final
focal_class.original_string: private static final String flagsPath = "data/common/flags/";
focal_class.type: String
focal_class.var_name: flagsPath
focal_class.file: gazeplay-commons/src/main/java/net/gazeplay/commons/utils/multilinguism/Languages.java
focal_class.identifier: Languages
focal_class.class_method_signature: Languages.createLanguagesMap()
focal_class.full_signature: private static SortedMap<Locale, LanguageDetails> createLanguagesMap()
focal_class.identifier: createLanguagesMap
focal_class.modifiers: private static
focal_class.parameters: ()
focal_class.return: SortedMap<Locale, LanguageDetails>
focal_class.signature: SortedMap<Locale, LanguageDetails> createLanguagesMap()
focal_class.class_method_signature: Languages.put(final SortedMap<Locale, LanguageDetails> result, final LanguageDetails languageDetails)
focal_class.full_signature: private static void put(final SortedMap<Locale, LanguageDetails> result, final LanguageDetails languageDetails)
focal_class.identifier: put
focal_class.modifiers: private static
focal_class.parameters: (final SortedMap<Locale, LanguageDetails> result, final LanguageDetails languageDetails)
focal_class.return: void
focal_class.signature: void put(final SortedMap<Locale, LanguageDetails> result, final LanguageDetails languageDetails)
focal_class.class_method_signature: Languages.build(final Locale locale, final String language, final boolean stableTranslationAvailable, final boolean leftAligned, final String... flags)
focal_class.full_signature: private static LanguageDetails build(final Locale locale, final String language, final boolean stableTranslationAvailable, final boolean leftAligned, final String... flags)
focal_class.identifier: build
focal_class.modifiers: private static
focal_class.parameters: (final Locale locale, final String language, final boolean stableTranslationAvailable, final boolean leftAligned, final String... flags)
focal_class.return: LanguageDetails
focal_class.signature: LanguageDetails build(final Locale locale, final String language, final boolean stableTranslationAvailable, final boolean leftAligned, final String... flags)
focal_class.class_method_signature: Languages.toFlagsLocations(final String[] flags)
focal_class.full_signature: private static List<String> toFlagsLocations(final String[] flags)
focal_class.identifier: toFlagsLocations
focal_class.modifiers: private static
focal_class.parameters: (final String[] flags)
focal_class.return: List<String>
focal_class.signature: List<String> toFlagsLocations(final String[] flags)
focal_class.class_method_signature: Languages.getLocale(Locale locale)
focal_class.full_signature: public static LanguageDetails getLocale(Locale locale)
focal_class.identifier: getLocale
focal_class.modifiers: public static
focal_class.parameters: (Locale locale)
focal_class.return: LanguageDetails
focal_class.signature: LanguageDetails getLocale(Locale locale)
focal_class.class_method_signature: Languages.getAllLanguageDetails()
focal_class.full_signature: public static Collection<LanguageDetails> getAllLanguageDetails()
focal_class.identifier: getAllLanguageDetails
focal_class.modifiers: public static
focal_class.parameters: ()
focal_class.return: Collection<LanguageDetails>
focal_class.signature: Collection<LanguageDetails> getAllLanguageDetails()
focal_class.class_method_signature: Languages.getAllCodes()
focal_class.full_signature: public static Collection<Locale> getAllCodes()
focal_class.identifier: getAllCodes
focal_class.modifiers: public static
focal_class.parameters: ()
focal_class.return: Collection<Locale>
focal_class.signature: Collection<Locale> getAllCodes()
focal_method.body: public static LanguageDetails getLocale(Locale locale) {
          Locale result = locale;
          if (result == null) {
              result = DEFAULT_CODE;
          }
  
          final LanguageDetails localeValue = languageMap.get(result);
  
          if (localeValue == null) {
              result = DEFAULT_CODE;
          }
  
          return languageMap.get(result);
      }
focal_method.class_method_signature: Languages.getLocale(Locale locale)
focal_method.full_signature: public static LanguageDetails getLocale(Locale locale)
focal_method.identifier: getLocale
focal_method.invocations: get get
focal_method.modifiers: public static
focal_method.parameters: (Locale locale)
focal_method.return: LanguageDetails
focal_method.signature: LanguageDetails getLocale(Locale locale)