Class ScreenBasedAlgorithmAdapter<T extends ClusterItem>

    • Constructor Detail

      • ScreenBasedAlgorithmAdapter

        public ScreenBasedAlgorithmAdapter​(Algorithm<T> algorithm)
    • Method Detail

      • addItem

        public boolean addItem​(T item)
        Description copied from interface: Algorithm
        Adds an item to the algorithm
        Specified by:
        addItem in interface Algorithm<T extends ClusterItem>
        Parameters:
        item - the item to be added
        Returns:
        true if the algorithm contents changed as a result of the call
      • addItems

        public boolean addItems​(java.util.Collection<T> items)
        Description copied from interface: Algorithm
        Adds a collection of items to the algorithm
        Specified by:
        addItems in interface Algorithm<T extends ClusterItem>
        Parameters:
        items - the items to be added
        Returns:
        true if the algorithm contents changed as a result of the call
      • removeItem

        public boolean removeItem​(T item)
        Description copied from interface: Algorithm
        Removes an item from the algorithm
        Specified by:
        removeItem in interface Algorithm<T extends ClusterItem>
        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

        public boolean removeItems​(java.util.Collection<T> items)
        Description copied from interface: Algorithm
        Removes a collection of items from the algorithm
        Specified by:
        removeItems in interface Algorithm<T extends ClusterItem>
        Parameters:
        items - the items to be removed
        Returns:
        true if this algorithm contents changed as a result of the call
      • updateItem

        public boolean updateItem​(T item)
        Description copied from interface: Algorithm
        Updates the provided item in the algorithm
        Specified by:
        updateItem in interface Algorithm<T extends ClusterItem>
        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.