Interface ResourceManager<T,​K>

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      T create​(K key)
      Creates a value for a given key.
      boolean exists​(K key)
      Checks for the existence of a given key.
      T get​(K key)
      Gets a value for a given key.
      T getOrCreate​(K key)
      Gets or creates a value for a given key.
    • Method Detail

      • get

        T get​(K key)
        Gets a value for a given key.
        Parameters:
        key - The key.
        Returns:
        The retrieved value.
      • exists

        boolean exists​(K key)
        Checks for the existence of a given key.
        Parameters:
        key - The key.
        Returns:
        Whether the key exists.
      • create

        T create​(K key)
        Creates a value for a given key.
        Parameters:
        key - The key.
        Returns:
        The created value.
      • getOrCreate

        T getOrCreate​(K key)
        Gets or creates a value for a given key.
        Parameters:
        key - The key.
        Returns:
        The retrieved or created value.