Skip to content

Commit

Permalink
Fix some typos and other issues in the javadocs
Browse files Browse the repository at this point in the history
  • Loading branch information
kezz committed Mar 7, 2025
1 parent 99aeeed commit bcd92bf
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@
import static java.util.Objects.requireNonNull;

/**
* An abstraction to ease the construction of translation registries with generic values.
* An abstraction to ease the construction of translation stores with generic values.
*
* @param <T> the value of the translation registry
* @param <T> the value of the translation store
* @since 4.20.0
*/
public abstract class AbstractTranslationStore<T> implements Examinable, TranslationStore<T> {
Expand All @@ -60,7 +60,7 @@ public abstract class AbstractTranslationStore<T> implements Examinable, Transla
private volatile @NotNull Locale defaultLocale = Locale.US;

/**
* Creates a new abstract translation registry with a given name.
* Creates a new abstract translation store with a given name.
*
* @param name the name
* @since 4.20.0
Expand Down Expand Up @@ -233,9 +233,9 @@ public String toString() {
}

/**
* An abstract, string-based translation registry.
* An abstract, string-based translation store.
*
* <p>This class extends upon the standard abstract translation registry by adding
* <p>This class extends upon the standard abstract translation store by adding
* support for reading from resource bundles.</p>
*
* @param <T> the type of the translation
Expand All @@ -245,7 +245,7 @@ public abstract static class StringBased<T> extends AbstractTranslationStore<T>
private static final Pattern SINGLE_QUOTE_PATTERN = Pattern.compile("'");

/**
* Creates a new abstract, string-based translation registry with a given name.
* Creates a new abstract, string-based translation store with a given name.
*
* @param name the name
* @since 4.20.0
Expand All @@ -255,7 +255,7 @@ protected StringBased(final @NotNull Key name) {
}

/**
* Parses a string into the format required for this translation registry.
* Parses a string into the format required for this translation store.
*
* @param string the string
* @param locale the locale for the string, if needed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public interface TranslationStore<T> extends Translator {
* Checks if any translations are explicitly registered for the specified key.
*
* @param key a translation key
* @return whether the registry contains a value for the translation key
* @return whether the store contains a value for the translation key
* @since 4.20.0
*/
boolean contains(final @NotNull String key);
Expand All @@ -86,13 +86,13 @@ public interface TranslationStore<T> extends Translator {
*
* @param key a translation key
* @param locale the locale
* @return whether the registry contains a value for the translation key and locale
* @return whether the store contains a value for the translation key and locale
* @since 4.20.0
*/
boolean contains(final @NotNull String key, final @NotNull Locale locale);

/**
* Sets the default locale used by this registry.
* Sets the default locale used by this store.
*
* @param locale the locale to use a default
* @since 4.20.0
Expand Down Expand Up @@ -167,10 +167,11 @@ interface StringBased<T> extends TranslationStore<T> {
*
* <p>It is highly recommended to create your bundle using {@link UTF8ResourceBundleControl} as your bundle control for UTF-8 support - for example:</p>
*
* <pre>
* <pre>{@code
* final TranslationStore store = ...;
* final ResourceBundle bundle = ResourceBundle.getBundle("my_bundle", Locale.GERMANY, UTF8ResourceBundleControl.get());
* registry.registerAll(Locale.GERMANY, bundle, false);
* </pre>
* store.registerAll(Locale.GERMANY, bundle, false);
* }</pre>
*
* @param locale a locale
* @param bundle a resource bundle
Expand Down

0 comments on commit bcd92bf

Please sign in to comment.