Interface IResultTask

  • All Known Implementing Classes:
    EntityResultTask

    public interface IResultTask
    Stores the results of an individual file for an individual task (detector), is used as child of IResultFile
    • Method Detail

      • addContainingBlock

        void addContainingBlock​(ICodeBlockGroup blockGroup)
        Adds a code block group found using the tasks detector which contains the file
        Parameters:
        blockGroup - code block group
      • addContainingBlock

        void addContainingBlock​(java.util.Collection<ICodeBlockGroup> blockGroups)
        Adds a collection of code block groups found using the tasks detector which all contain the file
        Parameters:
        blockGroups - collection of code block groups
      • addFileScore

        void addFileScore​(ISourceFile file,
                          float score)
        Adds a score from the task of the instance file against another file
        Parameters:
        file - file score is against
        score - score value
      • getContainingBlocks

        java.util.List<ICodeBlockGroup> getContainingBlocks()
        Fetches the list of code block groups from the detector which feature the instance file
        Returns:
        list of groups
      • getFileScore

        float getFileScore​(ISourceFile file)
        Gets the score of the instance file vs the passed file for the task, the file must have been registered using addFileScore(ISourceFile, float)
        Parameters:
        file - file score is against
        Returns:
        score value stored
      • getFileScores

        java.util.Map<ISourceFile,​java.lang.Float> getFileScores()
        Returns the full map of stored file vs instance file score for the task
        Returns:
        map of scores
      • getTask

        ITask getTask()
        Get the task this objects stores results for
        Returns:
        Task instance
      • getTaskScore

        float getTaskScore()
        Fetches the overall aggregate score for the instance file for the task
        Returns:
        score
      • setTaskScore

        void setTaskScore​(float score)
        Sets the overall aggregate score for the instance file for the task
        Parameters:
        score - score to set