Package hudson.plugins.clover
Class Ratio
- java.lang.Object
-
- hudson.plugins.clover.Ratio
-
- All Implemented Interfaces:
CoverageBarProvider
,Serializable
public final class Ratio extends Object implements Serializable, CoverageBarProvider
Represents x/y where x=numerator
and y=denominator
.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description float
denominator
float
numerator
static NumberFormat
PC_ROUND_DOWN_FORMAT
static NumberFormat
PC_ROUND_UP_FORMAT
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Ratio
create(float x, float y)
Creates a new instance ofRatio
.boolean
equals(Object o)
String
getHasData()
String
getPcCovered()
String
getPcUncovered()
String
getPcWidth()
int
getPercentage()
Gets the percentage in integer.String
getPercentage1d()
Gets the percentage in integer.float
getPercentageFloat()
Gets the percentage in float.String
getPercentageStr()
int
hashCode()
String
toString()
Gets "x/y" representation.
-
-
-
Field Detail
-
numerator
public final float numerator
-
denominator
public final float denominator
-
PC_ROUND_DOWN_FORMAT
public static final NumberFormat PC_ROUND_DOWN_FORMAT
-
PC_ROUND_UP_FORMAT
public static final NumberFormat PC_ROUND_UP_FORMAT
-
-
Method Detail
-
toString
public String toString()
Gets "x/y" representation.
-
getPercentage1d
public String getPercentage1d()
Gets the percentage in integer.- Returns:
- String percentage
-
getPercentageStr
public String getPercentageStr()
-
getPcWidth
public String getPcWidth()
- Specified by:
getPcWidth
in interfaceCoverageBarProvider
-
getPcUncovered
public String getPcUncovered()
- Specified by:
getPcUncovered
in interfaceCoverageBarProvider
-
getPcCovered
public String getPcCovered()
- Specified by:
getPcCovered
in interfaceCoverageBarProvider
-
getHasData
public String getHasData()
- Specified by:
getHasData
in interfaceCoverageBarProvider
-
getPercentage
public int getPercentage()
Gets the percentage in integer.- Returns:
- int percentage
-
getPercentageFloat
public float getPercentageFloat()
Gets the percentage in float.- Returns:
- float percentage
-
-