Interface TaskData


public interface TaskData
The data storage for the task
  • Method Summary

    Modifier and Type
    Method
    Description
    static TaskData
    Create a new instance of TaskData that uses ConcurrentHashMap
    default <T> T
    get(String key)
    Get the value from the data
    Get the raw value from the data
    put(String key, Object value)
    Put the value to the data
  • Method Details

    • create

      static TaskData create()
      Create a new instance of TaskData that uses ConcurrentHashMap
      Returns:
      the new instance
    • put

      Object put(String key, Object value)
      Put the value to the data
      Parameters:
      key - the key
      value - the value
      Returns:
      the previous value associated with the key or null if there is none
    • getRaw

      Object getRaw(String key)
      Get the raw value from the data
      Parameters:
      key - the key
      Returns:
      the value or null if there is none
    • get

      default <T> T get(String key)
      Get the value from the data
      Type Parameters:
      T - the type of the value
      Parameters:
      key - the key
      Returns:
      the value or null if there is none
      Throws:
      ClassCastException - if the value is not the same type as the type of the value