Interface ManagedProvider<E extends Identifiable<K>,​K>

    • Method Detail

      • add

        void add​(@NonNull E element)
        Adds an element.
        Parameters:
        element - element to be added
      • remove

        E remove​(@NonNull K key)
        Removes an element and returns the removed element.
        Parameters:
        key - key of the element that should be removed
        Returns:
        element that was removed, or null if no element with the given key exists
      • update

        E update​(@NonNull E element)
        Updates an element.
        Parameters:
        element - element to be updated
        Returns:
        returns the old element or null if no element with the same key exists
      • get

        E get​(K key)
        Returns an element for the given key or null if no element for the given key exists.
        Parameters:
        key - key
        Returns:
        returns element or null, if no element for the given key exists