Class MatchStatCounts

java.lang.Object
org.omegat.core.statistics.MatchStatCounts

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

    • MatchStatCounts

      public MatchStatCounts()
  • Method Details

    • 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 String[][] calcTableWithoutPercentage(String[] rows)
      Extract first two rows result to text table.
      Parameters:
      rows - an array of rows
      Returns:
      text table
    • calcTable

      public String[][] calcTable(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 String[][] calcTable(String[] rows, 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