Class Coverage.CoverageBuilder
java.lang.Object
com.parasoft.findings.jenkins.coverage.model.Coverage.CoverageBuilder
- Enclosing class:
- Coverage
Builder to create cached
Coverage
instances.-
Constructor Summary
ConstructorDescriptionCreates a newCoverage.CoverageBuilder
with all properties unset.CoverageBuilder
(Coverage existing) Creates a newCoverage.CoverageBuilder
with all properties set to the value of the provided existing instance.CoverageBuilder
(Metric metric) Creates a newCoverage.CoverageBuilder
with the specified metric. -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Creates the newCoverage
instance.void
Increments the number of covered items by 1.void
Increments the number of missed items by 1.setCovered
(int covered) Sets the number of covered items.setCovered
(String covered) Sets the number of covered items.Sets the metric of the coverage.Sets the metric of the coverage.setMissed
(int missed) Sets the number of missed items.Sets the number of missed items.setTotal
(int total) Sets the number of total items.Sets the number of total items.
-
Constructor Details
-
CoverageBuilder
public CoverageBuilder()Creates a newCoverage.CoverageBuilder
with all properties unset. -
CoverageBuilder
Creates a newCoverage.CoverageBuilder
with the specified metric. All other properties are unset.- Parameters:
metric
- the metric to set
-
CoverageBuilder
Creates a newCoverage.CoverageBuilder
with all properties set to the value of the provided existing instance.- Parameters:
existing
- the existing coverage to copy all properties from
-
-
Method Details
-
setMetric
Sets the metric of the coverage.- Parameters:
metric
- the metric of the coverage- Returns:
- this
-
setMetric
Sets the metric of the coverage.- Parameters:
metric
- the metric of the coverage- Returns:
- this
-
setTotal
Sets the number of total items.- Parameters:
total
- the number of total items- Returns:
- this
-
setTotal
Sets the number of total items.- Parameters:
total
- the number of total items- Returns:
- this
-
setCovered
Sets the number of covered items.- Parameters:
covered
- the number of covered items- Returns:
- this
-
setCovered
Sets the number of covered items.- Parameters:
covered
- the number of covered items- Returns:
- this
-
setMissed
Sets the number of missed items.- Parameters:
missed
- the number of missed items- Returns:
- this
-
setMissed
Sets the number of missed items.- Parameters:
missed
- the number of missed items- Returns:
- this
-
build
Creates the newCoverage
instance.- Returns:
- the new instance
-
incrementCovered
public void incrementCovered()Increments the number of covered items by 1. -
incrementMissed
public void incrementMissed()Increments the number of missed items by 1.
-