Package com.mrivanplays.jdcf.translation
Class TranslationCollector
- java.lang.Object
-
- com.mrivanplays.jdcf.translation.TranslationCollector
-
public class TranslationCollector extends java.lang.Object
Represents a collector of all known translations.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TranslationCollector
getInstance()
@NotNull java.lang.String[]
getSupportedLanguages()
Returns a copy of the supported languages.@NotNull Translations
getTranslations(@NotNull java.lang.String language)
Retrieves the translations of the specified languageboolean
isSupported(@NotNull java.lang.String language)
Returns whenever the specified language is supported.
-
-
-
Method Detail
-
getInstance
public static TranslationCollector getInstance()
-
getTranslations
@NotNull public @NotNull Translations getTranslations(@NotNull @NotNull java.lang.String language) throws java.io.IOException
Retrieves the translations of the specified language- Parameters:
language
- the language you want to get the translations of- Returns:
- translations object
- Throws:
java.io.IOException
- if an i/o occur
-
isSupported
public boolean isSupported(@NotNull @NotNull java.lang.String language)
Returns whenever the specified language is supported.- Parameters:
language
- the language you want to check if it is supported or not- Returns:
true
if supported,false
otherwise
-
getSupportedLanguages
@NotNull public @NotNull java.lang.String[] getSupportedLanguages()
Returns a copy of the supported languages.- Returns:
- supported languages
-
-