Class MatchStatCounts


  • public class MatchStatCounts
    extends java.lang.Object
    Bean for store match count for one file or for full project, i.e. "Repetitions", "Exact match", "95%-100%", "85%-94%", etc.
    • Constructor Detail

      • MatchStatCounts

        public MatchStatCounts()
    • Method Detail

      • addRepetition

        public void addRepetition​(StatCount count)
      • addRepetitionWithinThisFile

        public void addRepetitionWithinThisFile​(StatCount count)
      • addRepetitionFromOtherFiles

        public void addRepetitionFromOtherFiles​(StatCount count)
      • addExact

        public void addExact​(StatCount count)
      • addForPercents

        public void addForPercents​(int percent,
                                   StatCount count)
      • addCounts

        public MatchStatCounts addCounts​(MatchStatCounts other)
        Add all counts contained in another MatchStatCounts instance into this instance.
        Parameters:
        other - Counts to add
        Returns:
        This instance
      • calcTableWithoutPercentage

        public java.lang.String[][] calcTableWithoutPercentage​(java.lang.String[] rows)
        Extract first two rows result to text table.
        Parameters:
        rows - an array of rows
        Returns:
        text table
      • calcTable

        public java.lang.String[][] calcTable​(java.lang.String[] rows)
        Extract result to text table. Convenience method for calcTable(String[], IntPredicate) that accepts all rows.
        Parameters:
        rows - An array of row headers
        Returns:
        text table
      • calcTable

        public java.lang.String[][] calcTable​(java.lang.String[] rows,
                                              java.util.function.IntPredicate rowFilter)
        Extract result to text table. Rows for which the rowFilter returns false will be skipped.
        Parameters:
        rows - An array of row headers
        rowFilter - A filter indicating rows that should be kept
        Returns:
        text table