Package org.scijava.util
Class UnitUtils
- java.lang.Object
-
- org.scijava.util.UnitUtils
-
public final class UnitUtils extends Object
Utility methods for working with units.- Author:
- Barry DeZonia, Curtis Rueden
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Stringformat(double power)static StringgetAbbreviatedByteLabel(double totBytes)
-
-
-
Method Detail
-
getAbbreviatedByteLabel
public static String getAbbreviatedByteLabel(double totBytes)
- Returns:
- A properly formatted String representation of the given bytes, in
the default
Localefor this JVM.
-
format
public static String format(double power)
- Returns:
- Format result with 0 decimal places for bytes, or 1 for larger values
-
-