public class UnitComponent extends Object
For example the value 1025 is split in kilo=1, base=25 for the SI UnitSystem, but in kilo=1, base=1 for the
IEC 60027-2 UnitSystem.
| Constructor and Description |
|---|
UnitComponent(long value,
UnitSystem unitSystem)
Creates a representation in the
UnitSystem for the value. |
| Modifier and Type | Method and Description |
|---|---|
int |
base()
Returns the base value, from the remainder less than the "kilo" value
|
int |
giga()
Returns the full giga value.
|
int |
kilo()
Returns the full kilo value, from the remainder less than the "mega" value
|
int |
mega()
Returns the full mega value, from the remainder less than the "giga" value
|
public UnitComponent(long value,
UnitSystem unitSystem)
UnitSystem for the value.value - The multiplier for each prefix, e.g. 1000 or 1024unitSystem - The UnitSystem to usepublic int base()
public int kilo()
public int mega()
public int giga()
Integer.MAX_VALUECopyright © 2018 trivago. All rights reserved.