Class Property


  • public class Property
    extends Object
    Store some default properties of this framework.
    • 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' key
        value - 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