Package org.jacoco.report.check
Class Limit
java.lang.Object
org.jacoco.report.check.Limit
Descriptor for a limit which is given by a
Rule.-
Constructor Summary
ConstructorsConstructorDescriptionLimit()Creates a new instance with the following defaults: counter entity:ICoverageNode.CounterEntity.INSTRUCTIONcounter value:ICounter.CounterValue.COVEREDRATIOminimum: no limit maximum: no limit -
Method Summary
Modifier and TypeMethodDescriptiongetValue()voidsetCounter(String entity) Sets the counter entity to check.voidsetMaximum(String maximum) Sets the expected maximum value.voidsetMinimum(String minimum) Sets the expected minimum value.voidSets the value to check.
-
Constructor Details
-
Limit
public Limit()Creates a new instance with the following defaults:- counter entity:
ICoverageNode.CounterEntity.INSTRUCTION - counter value:
ICounter.CounterValue.COVEREDRATIO - minimum: no limit
- maximum: no limit
- counter entity:
-
-
Method Details
-
getEntity
- Returns:
- the configured counter entity to check
-
setCounter
Sets the counter entity to check.- Parameters:
entity- counter entity to check
-
getValue
- Returns:
- the configured value to check
-
setValue
Sets the value to check.- Parameters:
value- value to check
-
getMinimum
- Returns:
- configured minimum value, or
nullif no minimum is given
-
setMinimum
Sets the expected minimum value. If the minimum refers to a ratio it must be in the range from 0.0 to 1.0 where the number of decimal places will also determine the precision in error messages. A limit ratio may optionally be declared as a percentage where 0.80 and 80% represent the same value.- Parameters:
minimum- allowed minimum ornull, if no minimum should be checked
-
getMaximum
- Returns:
- configured maximum value, or
nullif no maximum is given
-
setMaximum
Sets the expected maximum value. If the maximum refers to a ratio it must be in the range from 0.0 to 1.0 where the number of decimal places will also determine the precision in error messages. A limit ratio may optionally be declared as a percentage where 0.80 and 80% represent the same value.- Parameters:
maximum- allowed maximum ornull, if no maximum should be checked
-