Klasse CoverageColumnType
java.lang.Object
io.jenkins.plugins.coverage.model.visualization.dashboard.CoverageColumnType
- Bekannte direkte Unterklassen:
ChangeCoverage
,ChangeCoverageDelta
,IndirectCoverageChanges
,ProjectCoverage
,ProjectCoverageDelta
Provides functions for different types of coverage that can be represented within a
CoverageColumn
.- Autor:
- Florian Orendi
-
Konstruktorübersicht
KonstruktorBeschreibungCoverageColumnType
(org.jvnet.localizer.Localizable displayName) Constructor. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungabstract String
formatCoverage
(CoveragePercentage coverage, Locale locale) Formats the passed coverage using the passedLocale
.Returns the anchor which stands for a specific part of the coverage report which belongs to this coverage column.Gets the names of the available coverage types.protected ColorProvider
Provides acolor provider
which is used to determine fill and line colors.abstract Optional
<CoveragePercentage> getCoverage
(CoverageBuildAction action, CoverageMetric metric) Gets the coverage of the passed metric from the passed action.abstract ColorProvider.DisplayColors
getDisplayColors
(CoveragePercentage coverage) Gets thedisplay colors
which are used for visualizing the passed coverage.
-
Konstruktordetails
-
CoverageColumnType
public CoverageColumnType(org.jvnet.localizer.Localizable displayName) Constructor.- Parameter:
displayName
- The name of the coverage type
-
-
Methodendetails
-
getColorProvider
Provides acolor provider
which is used to determine fill and line colors.- Gibt zurück:
- the color provider
-
getCoverage
public abstract Optional<CoveragePercentage> getCoverage(CoverageBuildAction action, CoverageMetric metric) Gets the coverage of the passed metric from the passed action.- Parameter:
action
- Theaction
which contains the coveragemetric
- Thecoverage metric
- Gibt zurück:
- the coverage as optional or an empty optional if no coverage has been found
-
getDisplayColors
Gets thedisplay colors
which are used for visualizing the passed coverage.- Parameter:
coverage
- The coverage percentage- Gibt zurück:
- the display colors
-
formatCoverage
Formats the passed coverage using the passedLocale
.- Parameter:
coverage
- The coverage to be formattedlocale
- The locale- Gibt zurück:
- the formatted coverage string
-
getAnchor
Returns the anchor which stands for a specific part of the coverage report which belongs to this coverage column. The default value is '#overview'.- Gibt zurück:
- the anchor
-
getAvailableCoverageTypeNames
Gets the names of the available coverage types.- Gibt zurück:
- the display names
-
getDisplayName
-