Package com.mrivanplays.jdcf.translation
Class PropertyTranslationFile
- java.lang.Object
-
- com.mrivanplays.jdcf.translation.PropertyTranslationFile
-
- All Implemented Interfaces:
TranslationFile
public class PropertyTranslationFile extends java.lang.Object implements TranslationFile
Represents a translation file implementation, utilising the ".properties" file type.
-
-
Constructor Summary
Constructors Constructor Description PropertyTranslationFile(java.io.InputStream in)
PropertyTranslationFile(java.io.Reader in)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull java.lang.String
getFileType()
Returns the translation file type.@NotNull java.util.Collection<java.lang.String>
getKeys()
Returns the keys of all translations present@NotNull java.lang.String
getString(java.lang.String key)
Returns the translation with the specified key, or empty if the translation doesn't exist.
-
-
-
Method Detail
-
getString
@NotNull public @NotNull java.lang.String getString(java.lang.String key)
Description copied from interface:TranslationFile
Returns the translation with the specified key, or empty if the translation doesn't exist.- Specified by:
getString
in interfaceTranslationFile
- Parameters:
key
- key- Returns:
- translation or empty string
-
getFileType
@NotNull public @NotNull java.lang.String getFileType()
Description copied from interface:TranslationFile
Returns the translation file type.- Specified by:
getFileType
in interfaceTranslationFile
- Returns:
- file type
-
getKeys
@NotNull public @NotNull java.util.Collection<java.lang.String> getKeys()
Description copied from interface:TranslationFile
Returns the keys of all translations present- Specified by:
getKeys
in interfaceTranslationFile
- Returns:
- keys
-
-