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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract TconvertType(@NotNull Object object) Convert the type of the value from the raw valuefinal Tget(@NotNull DownloadInfo downloadInfo) Get the value from the download infofinal TGet the default valuefinal @NotNull StringgetKey()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
-