hudson.plugins.emma
Class Ratio

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

@ExportedBean
public final class Ratio
extends Object
implements Serializable

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

Author:
Kohsuke Kawaguchi
See Also:
Serialized Form

Constructor Summary
Ratio(float... f)
           
 
Method Summary
 void addValue(String v)
           
 boolean equals(Object o)
           
 float getDenominator()
           
 float getNumerator()
           
 int getPercentage()
          Gets the percentage in integer.
 float getPercentageFloat()
          Gets the percentage in float.
 int hashCode()
           
 boolean isInitialized()
           
 String toString()
          Gets "x/y" representation.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Ratio

public Ratio(float... f)
Method Detail

getNumerator

public float getNumerator()

getDenominator

public float getDenominator()

toString

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

Overrides:
toString in class Object

getPercentage

@Exported
public int getPercentage()
Gets the percentage in integer.


getPercentageFloat

@Exported
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

addValue

public void addValue(String v)

isInitialized

public boolean isInitialized()


Copyright © 2004-2012 Hudson. All Rights Reserved.