org.opennms.core.utils
Class SIUtils

java.lang.Object
  extended by org.opennms.core.utils.SIUtils

public class SIUtils
extends java.lang.Object

Utilities for manipulating values in SI units. This is the International System of Units that you learned in science class.

Author:
djgregor

Constructor Summary
SIUtils()
           
 
Method Summary
static java.lang.String getHumanReadableIfSpeed(long ifSpeed)
          Method used to convert an integer bits-per-second value and a more commonly recognized abbreviation for network interface speeds.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SIUtils

public SIUtils()
Method Detail

getHumanReadableIfSpeed

public static java.lang.String getHumanReadableIfSpeed(long ifSpeed)
Method used to convert an integer bits-per-second value and a more commonly recognized abbreviation for network interface speeds. Feel free to expand it as necessary to accomodate different values.

Parameters:
ifSpeed - The bits-per-second value to be converted into a string description
Returns:
A string representation of the speed ("100 Mbps" for example)


Copyright © 2007. All Rights Reserved.