org.eclipse.test.internal.performance.data
Class Unit

java.lang.Object
  extended by org.eclipse.test.internal.performance.data.Unit

public class Unit
extends java.lang.Object

Since:
3.1

Field Summary
static Unit BYTE
           
static Unit CARDINAL
           
static Unit INVOCATION
           
static Unit SECOND
           
 
Constructor Summary
Unit(java.lang.String shortName, java.lang.String fullName, boolean binary)
           
 
Method Summary
static java.lang.String formatedTime(long diff)
          Answer a formatted string for the elapsed time (minutes, hours or days) that is appropriate for the scale of the time.
 java.lang.String formatEng(long n)
          Answer a number formatted using engineering conventions, K thousands, M millions, G billions and T trillions.
 java.lang.String getDisplayValue1(double magnitude)
           
 java.lang.String getDisplayValue1(long magnitudel, int multiplier)
           
 java.lang.String getFullName()
           
 java.lang.String getShortName()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SECOND

public static final Unit SECOND

BYTE

public static final Unit BYTE

CARDINAL

public static final Unit CARDINAL

INVOCATION

public static final Unit INVOCATION
Constructor Detail

Unit

public Unit(java.lang.String shortName,
            java.lang.String fullName,
            boolean binary)
Method Detail

getShortName

public java.lang.String getShortName()

getFullName

public java.lang.String getFullName()

getDisplayValue1

public java.lang.String getDisplayValue1(long magnitudel,
                                         int multiplier)

getDisplayValue1

public java.lang.String getDisplayValue1(double magnitude)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

formatedTime

public static java.lang.String formatedTime(long diff)
Answer a formatted string for the elapsed time (minutes, hours or days) that is appropriate for the scale of the time.

Parameters:
diff - time in milliseconds I copied this from karasiuk.utility.TimeIt
Returns:
the formatted time

formatEng

public java.lang.String formatEng(long n)
Answer a number formatted using engineering conventions, K thousands, M millions, G billions and T trillions. I copied this method from karasiuk.utility.Misc.

Parameters:
n - the number to format
Returns:
the formatted number