@Test public void getString_WithNonexistentId() { String nonexistent = parsedStringPack.getString(EXPECTED_STRINGS.length + 1); assertNull(nonexistent); }
@Nullable public String getString(int id) { final String result = strings.get(id); if (result == null) { return loadString(id); } else { return result; } }
ParsedStringPack { @Nullable public String getString(int id) { final String result = strings.get(id); if (result == null) { return loadString(id); } else { return result; } } }
ParsedStringPack { @Nullable public String getString(int id) { final String result = strings.get(id); if (result == null) { return loadString(id); } else { return result; } } ParsedStringPack(@NonNull InputStream inputStream, @NonNull List<String> parentLocales); }
ParsedStringPack { @Nullable public String getString(int id) { final String result = strings.get(id); if (result == null) { return loadString(id); } else { return result; } } ParsedStringPack(@NonNull InputStream inputStream, @NonNull List<String> parentLocales); boolean isEmpty(); @Nullable String getString(int id); @Nullable String getQuantityString(int id, Object quantity, @NonNull PluralRules pluralRules); }
ParsedStringPack { @Nullable public String getString(int id) { final String result = strings.get(id); if (result == null) { return loadString(id); } else { return result; } } ParsedStringPack(@NonNull InputStream inputStream, @NonNull List<String> parentLocales); boolean isEmpty(); @Nullable String getString(int id); @Nullable String getQuantityString(int id, Object quantity, @NonNull PluralRules pluralRules);  }