Class ScreenBasedAlgorithmAdapter

    • Constructor Detail

      • ScreenBasedAlgorithmAdapter

        ScreenBasedAlgorithmAdapter(Algorithm<T> algorithm)
    • Method Detail

      • addItem

         Boolean addItem(T item)

        Adds an item to the algorithm

        Parameters:
        item - the item to be added
        Returns:

        true if the algorithm contents changed as a result of the call

      • addItems

         Boolean addItems(Collection<T> items)

        Adds a collection of items to the algorithm

        Parameters:
        items - the items to be added
        Returns:

        true if the algorithm contents changed as a result of the call

      • removeItem

         Boolean removeItem(T item)

        Removes an item from the algorithm

        Parameters:
        item - the item to be removed
        Returns:

        true if this algorithm contained the specified element (or equivalently, if this algorithm changed as a result of the call).

      • removeItems

         Boolean removeItems(Collection<T> items)

        Removes a collection of items from the algorithm

        Parameters:
        items - the items to be removed
        Returns:

        true if this algorithm contents changed as a result of the call

      • updateItem

         Boolean updateItem(T item)

        Updates the provided item in the algorithm

        Parameters:
        item - the item to be updated
        Returns:

        true if the item existed in the algorithm and was updated, or false if the item did not exist in the algorithm and the algorithm contents remain unchanged.