| Package | Description |
|---|---|
| com.trivago.triava.util |
| Modifier and Type | Field and Description |
|---|---|
static UnitSystem |
UnitSystem.IEC
IEC base 2 units (Ki) and names (kibi), using 1024 as a base
|
static UnitSystem |
UnitSystem.JEDEC
JEDEC units (K) and names (kilo), using 1024 as a base.
|
static UnitSystem |
UnitSystem.SI
Si units (k) and names (kilo), using 1000 as a base
|
| Modifier and Type | Method and Description |
|---|---|
static String |
UnitFormatter.formatAsUnit(long value,
UnitSystem unitSystem,
String unitPostfix)
Formats a value to human readable representation, using the given Unit System.
|
static String |
UnitFormatter.formatAsUnit(long value,
UnitSystem unitSystem,
String unitPostfix,
DecimalFormat format)
Formats a value to human readable representation, using the given Unit System.
|
static String |
UnitFormatter.formatAsUnits(long number,
UnitSystem unitSystem,
String unitPostfix,
String separator)
Formats the value to human readable representation, using the given Unit System.
|
| Constructor and Description |
|---|
UnitComponent(long value,
UnitSystem unitSystem)
Creates a representation in the
UnitSystem for the value. |
Copyright © 2018 trivago. All rights reserved.