Klasse Ratio
java.lang.Object
io.jenkins.plugins.coverage.targets.Ratio
- Alle implementierten Schnittstellen:
Serializable
- Autor:
- Kohsuke Kawaguchi
- Siehe auch:
-
Feldübersicht
-
Methodenübersicht
-
Felddetails
-
NULL
Null Object. -
numerator
public final float numerator -
denominator
public final float denominator
-
-
Methodendetails
-
toString
-
getPercentage
public int getPercentage()Gets the percentage in integer. If float percentage is less than 100 and larger than 95.5, then return rounded down value, else return rounded off value- Gibt zurück:
- percentage
-
getPercentageFloat
public float getPercentageFloat()Gets the percentage in float. For exceptional cases of 0/0, return 100% as it corresponds to expected ammout. For error cases of x/0, return 0% as x is unexpected ammout.- Gibt zurück:
- percentage
-
getPercentageString
Gets the percentage as a formatted string used for sorting the html table. If float percentage is less than 100 and larger than 99.995, then return rounded down value, else return rounded off value.- Gibt zurück:
- percentage
-
equals
-
hashCode
public int hashCode() -
create
Creates a new instance ofRatio
.- Parameter:
x
- numeratory
- denominator- Gibt zurück:
- the ratio
-