Klasse CoverageMetric

java.lang.Object
io.jenkins.plugins.coverage.model.CoverageMetric
Alle implementierten Schnittstellen:
Serializable, Comparable<CoverageMetric>

public class CoverageMetric extends Object implements Comparable<CoverageMetric>, Serializable
A coverage metric to identify the coverage result type. Note: this class has a natural ordering that is inconsistent with equals.
Autor:
Ullrich Hafner
Siehe auch:
  • Felddetails

    • MODULE

      public static final CoverageMetric MODULE
      Module coverage.
    • PACKAGE

      public static final CoverageMetric PACKAGE
      Package or namespace coverage.
    • FILE

      public static final CoverageMetric FILE
      File coverage.
    • CLASS

      public static final CoverageMetric CLASS
      Class coverage.
    • METHOD

      public static final CoverageMetric METHOD
      Method coverage.
    • INSTRUCTION

      public static final CoverageMetric INSTRUCTION
      Instruction coverage.
    • LINE

      public static final CoverageMetric LINE
      Line coverage.
    • BRANCH

      public static final CoverageMetric BRANCH
      Branch coverage.
  • Methodendetails

    • valueOf

      public static CoverageMetric valueOf(String name)
      Creates a new CoverageMetric with the specified name. If the name is the same as the name of one of the predefined metrics, then the existing metric is returned.
      Parameter:
      name - the name of the metric
      Gibt zurück:
      the metric
    • getAvailableCoverageMetrics

      public static List<CoverageMetric> getAvailableCoverageMetrics()
      Provides all available values of CoverageMetric.
      Gibt zurück:
      the available metrics
    • equalsIgnoreCase

      public boolean equalsIgnoreCase(String searchName)
      Checks if this instance has a name that is equal to the specified name (ignoring case).
      Parameter:
      searchName - the coverage metric name to check
      Gibt zurück:
      true if this instance has the same name, false otherwise
    • equalsIgnoreCase

      public static boolean equalsIgnoreCase(@CheckForNull String a, @CheckForNull String b)

      Compares two CharSequences, returning true if they represent equal sequences of characters, ignoring case.

      nulls are handled without exceptions. Two null references are considered equal. The comparison is case insensitive.

       StringUtils.equalsIgnoreCase(null, null)   = true
       StringUtils.equalsIgnoreCase(null, "abc")  = false
       StringUtils.equalsIgnoreCase("abc", null)  = false
       StringUtils.equalsIgnoreCase("abc", "abc") = true
       StringUtils.equalsIgnoreCase("abc", "ABC") = true
       
      Parameter:
      a - the first CharSequence, may be null
      b - the second CharSequence, may be null
      Gibt zurück:
      true if the CharSequences are equal (case-insensitive), or both null
    • getName

      public String getName()
    • isLeaf

      public boolean isLeaf()
    • toString

      public String toString()
      Setzt außer Kraft:
      toString in Klasse Object
    • compareTo

      public int compareTo(CoverageMetric other)
      Angegeben von:
      compareTo in Schnittstelle Comparable<CoverageMetric>
    • equals

      public boolean equals(Object o)
      Setzt außer Kraft:
      equals in Klasse Object
    • hashCode

      public int hashCode()
      Setzt außer Kraft:
      hashCode in Klasse Object