Package top.focess.qq.api.util
Class Property
- java.lang.Object
-
- top.focess.qq.api.util.Property
-
public class Property extends Object
Store some default properties of this framework.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> Tget(String key)Get the value of the key in the propertiesstatic booleanhasKey(String key)Indicate whether it has the key or notstatic voidput(String key, Object value)Set the propertystatic voidremove(String key)Remove the property
-
-
-
Method Detail
-
hasKey
public static boolean hasKey(String key)
Indicate whether it has the key or not- Parameters:
key- the MiraiQQ framework properties' key- Returns:
- true if it has the key, false otherwise
-
put
public static void put(String key, Object value)
Set the property- Parameters:
key- the MiraiQQ framework properties' keyvalue- the MiraiQQ framework properties' value
-
get
public static <T> T get(String key)
Get the value of the key in the properties- Type Parameters:
T- the desired T type- Parameters:
key- the MiraiQQ framework properties' key- Returns:
- the desired value
- Throws:
ClassCastException- if the desired T type is not equal to its original type
-
remove
public static void remove(String key)
Remove the property- Parameters:
key- the MiraiQQ framework properties' key
-
-