hudson.plugins.cobertura
Class Ratio

java.lang.Object
  extended by hudson.plugins.cobertura.Ratio
All Implemented Interfaces:
java.io.Serializable

public final class Ratio
extends java.lang.Object
implements java.io.Serializable

Represents x/y where x=numerator and y=denominator.

Author:
Kohsuke Kawaguchi
See Also:
Serialized Form

Field Summary
 float denominator
           
 float numerator
           
 
Method Summary
static Ratio create(float x, float y)
          Creates a new instance of Ratio.
 boolean equals(java.lang.Object o)
          
 int getPercentage()
          Gets the percentage in integer.
 float getPercentageFloat()
          Gets the percentage in float.
 int hashCode()
          
 java.lang.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
Method Detail

toString

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

Overrides:
toString in class java.lang.Object

getPercentage

public int getPercentage()
Gets the percentage in integer.


getPercentageFloat

public float getPercentageFloat()
Gets the percentage in float.


equals

public boolean equals(java.lang.Object o)

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()

Overrides:
hashCode in class java.lang.Object

create

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



Copyright © 2010. All Rights Reserved.