Package org.omegat.core.statistics
Class MatchStatCounts
- java.lang.Object
-
- org.omegat.core.statistics.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 Summary
Constructors Constructor Description MatchStatCounts()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MatchStatCounts
addCounts(MatchStatCounts other)
Add all counts contained in another MatchStatCounts instance into this instance.void
addExact(StatCount count)
void
addForPercents(int percent, StatCount count)
void
addRepetition(StatCount count)
void
addRepetitionFromOtherFiles(StatCount count)
void
addRepetitionWithinThisFile(StatCount count)
java.lang.String[][]
calcTable(java.lang.String[] rows)
Extract result to text table.java.lang.String[][]
calcTable(java.lang.String[] rows, java.util.function.IntPredicate rowFilter)
Extract result to text table.java.lang.String[][]
calcTableWithoutPercentage(java.lang.String[] rows)
Extract first two rows result to text table.
-
-
-
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 forcalcTable(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 therowFilter
returnsfalse
will be skipped.- Parameters:
rows
- An array of row headersrowFilter
- A filter indicating rows that should be kept- Returns:
- text table
-
-