Class InfoKey<T>
java.lang.Object
me.hsgamer.hscore.downloader.core.object.InfoKey<T>
- Type Parameters:
T
- the type of the final value
A key to get value from the download info
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract T
convertType
(@NotNull Object object) Convert the type of the value from the raw valuefinal T
get
(@NotNull DownloadInfo downloadInfo) Get the value from the download infofinal T
Get the default valuefinal @NotNull String
getKey()
Get the key to the value
-
Constructor Details
-
InfoKey
Create an info key- Parameters:
key
- the key to the valuedefaultValue
- the default value
-
-
Method Details
-
getKey
Get the key to the value- Returns:
- the key
-
getDefaultValue
Get the default value- Returns:
- the default value
-
convertType
Convert the type of the value from the raw value- Parameters:
object
- the raw value- Returns:
- the converted value
-
get
Get the value from the download info- Parameters:
downloadInfo
- the download info- Returns:
- the value
-