Class Coverage.CoverageBuilder

java.lang.Object
com.parasoft.findings.jenkins.coverage.model.Coverage.CoverageBuilder
Enclosing class:
Coverage

public static final class Coverage.CoverageBuilder extends Object
Builder to create cached Coverage instances.
  • Constructor Details

    • CoverageBuilder

      public CoverageBuilder()
      Creates a new Coverage.CoverageBuilder with all properties unset.
    • CoverageBuilder

      public CoverageBuilder(@CheckForNull Metric metric)
      Creates a new Coverage.CoverageBuilder with the specified metric. All other properties are unset.
      Parameters:
      metric - the metric to set
    • CoverageBuilder

      public CoverageBuilder(Coverage existing)
      Creates a new Coverage.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

      @CanIgnoreReturnValue public Coverage.CoverageBuilder setMetric(Metric metric)
      Sets the metric of the coverage.
      Parameters:
      metric - the metric of the coverage
      Returns:
      this
    • setMetric

      @CanIgnoreReturnValue public Coverage.CoverageBuilder setMetric(String metric)
      Sets the metric of the coverage.
      Parameters:
      metric - the metric of the coverage
      Returns:
      this
    • setTotal

      @CanIgnoreReturnValue public Coverage.CoverageBuilder setTotal(int total)
      Sets the number of total items.
      Parameters:
      total - the number of total items
      Returns:
      this
    • setTotal

      @CanIgnoreReturnValue public Coverage.CoverageBuilder setTotal(String total)
      Sets the number of total items.
      Parameters:
      total - the number of total items
      Returns:
      this
    • setCovered

      @CanIgnoreReturnValue public Coverage.CoverageBuilder setCovered(int covered)
      Sets the number of covered items.
      Parameters:
      covered - the number of covered items
      Returns:
      this
    • setCovered

      @CanIgnoreReturnValue public Coverage.CoverageBuilder setCovered(String covered)
      Sets the number of covered items.
      Parameters:
      covered - the number of covered items
      Returns:
      this
    • setMissed

      @CanIgnoreReturnValue public Coverage.CoverageBuilder setMissed(int missed)
      Sets the number of missed items.
      Parameters:
      missed - the number of missed items
      Returns:
      this
    • setMissed

      @CanIgnoreReturnValue public Coverage.CoverageBuilder setMissed(String missed)
      Sets the number of missed items.
      Parameters:
      missed - the number of missed items
      Returns:
      this
    • build

      public Coverage build()
      Creates the new Coverage 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.