hudson.plugins.clover
Class Ratio

java.lang.Object
  extended by 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.

Author:
Kohsuke Kawaguchi
See Also:
Serialized Form

Field Summary
 float denominator
           
 float numerator
           
static NumberFormat PC_WIDTH_FORMAT
           
 
Method Summary
static Ratio create(float x, float y)
          Creates a new instance of Ratio.
 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.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

numerator

public final float numerator

denominator

public final float denominator

PC_WIDTH_FORMAT

public static final NumberFormat PC_WIDTH_FORMAT
Method Detail

toString

public String toString()
Gets "x/y" representation.

Overrides:
toString in class Object

getPercentage1d

public String getPercentage1d()
Gets the percentage in integer.


getPercentageStr

public String getPercentageStr()

getPcWidth

public String getPcWidth()
Specified by:
getPcWidth in interface CoverageBarProvider

getPcUncovered

public String getPcUncovered()
Specified by:
getPcUncovered in interface CoverageBarProvider

getPcCovered

public String getPcCovered()
Specified by:
getPcCovered in interface CoverageBarProvider

getHasData

public String getHasData()
Specified by:
getHasData in interface CoverageBarProvider

getPercentage

public int getPercentage()
Gets the percentage in integer.


getPercentageFloat

public float getPercentageFloat()
Gets the percentage in float.


equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

create

public static Ratio create(float x,
                           float y)
Creates a new instance of Ratio.



Copyright © 2004-2012 Hudson. All Rights Reserved.