Interface WorksetMappingAlgorithm<T,​E,​R>


  • public interface WorksetMappingAlgorithm<T,​E,​R>
    • Method Detail

      • expectedElementCount

        int expectedElementCount()
        Provides a hint to initialize containers appropriately.
        Returns:
        expected number of elements visited
      • initialize

        Collection<T> initialize​(Map<T,​E> mapping)
        Provide the initial elements that should be processed by update. Also performs any required action on the initial elements (e.g. update mapping).
        Returns:
        initial elements
      • update

        Collection<T> update​(Map<T,​E> mapping,
                             T currentT)
        Process the given element and perform its corresponding actions. If during this process the need arises to update other elements as well, return them.
        Parameters:
        mapping - the calculated mapping (should be updated appropriately)
        currentT - the current element that should be processed by this method
        Returns:
        a collection of elements that need to be processed
      • result

        R result()
        Provides the result of this algorithm's internal action. More precise, this function returns the accumulated object E after the successful application of all update calls.
        Returns:
        the resulting object