import static systems.uom.unicode.CLDR.*; // Static import (from Unicode System).
import static javax.measure.BinaryPrefix.*; // Static import.
import javax.measure.*;
import systems.uom.quantity.Information; // (from Systems Quantities)
...
Unit<Information> MEBIT = MEBI(BIT);
Unit<Information> GIBYTE = GIBI(BYTE);
You could also apply Unit.prefix:
...
Unit<Information> MEBIT = BIT.prefix(MEBI);
Unit<Information> GIBYTE = BYTE.prefix(GIBI);
Do not use ordinal() to obtain the numeric representation of BinaryPrefix. Use getValue() and getExponent() instead.
| Modifier and Type | Field and Description |
|---|---|
| public static final BinaryPrefix | EXBI
Prefix for 10246. |
| private final int | exponent
Exponent part of the associated factor in base^exponent representation. |
| public static final BinaryPrefix | GIBI
Prefix for 10243. |
| public static final BinaryPrefix | KIBI
Prefix for 1024. |
| public static final BinaryPrefix | MEBI
Prefix for 10242. |
| public static final BinaryPrefix | PEBI
Prefix for 10245. |
| private final String | |
| public static final BinaryPrefix | TEBI
Prefix for 10244. |
| public static final BinaryPrefix | YOBI
Prefix for 10248. |
| public static final BinaryPrefix | ZEBI
Prefix for 10247. |
| Access | Constructor and Description |
|---|---|
| private | BinaryPrefix(String
the symbol of this prefix. symbol, int part of the associated factor in base^exponent representation. exponent)Creates a new prefix. |
| Modifier and Type | Method and Description |
|---|---|
| public static < type of the quantity measured by the unit. Q extends Quantity | |
| public int | getExponent()
Implements javax. base^exponent representation.
|
| public String | Returns: this prefix name, notnull.Implements javax. |
| public String | Returns: this prefix symbol, notnull.Implements javax. |
| public Integer | getValue()
Implements javax. base^exponent representation.
|
| public static < type of the quantity measured by the unit. Q extends Quantity | |
| public static < type of the quantity measured by the unit. Q extends Quantity | |
| public static < type of the quantity measured by the unit. Q extends Quantity | |
| public static < type of the quantity measured by the unit. Q extends Quantity | |
| public static < type of the quantity measured by the unit. Q extends Quantity | |
| public static BinaryPrefix | |
| public static BinaryPrefix[] | |
| public static < type of the quantity measured by the unit. Q extends Quantity | |
| public static < type of the quantity measured by the unit. Q extends Quantity |
| EXBI | back to summary |
|---|---|
| public static final BinaryPrefix EXBI Prefix for 10246. | |
| exponent | back to summary |
|---|---|
| private final int exponent Exponent part of the associated factor in base^exponent representation. | |
| GIBI | back to summary |
|---|---|
| public static final BinaryPrefix GIBI Prefix for 10243. | |
| KIBI | back to summary |
|---|---|
| public static final BinaryPrefix KIBI Prefix for 1024. | |
| MEBI | back to summary |
|---|---|
| public static final BinaryPrefix MEBI Prefix for 10242. | |
| PEBI | back to summary |
|---|---|
| public static final BinaryPrefix PEBI Prefix for 10245. | |
| symbol | back to summary |
|---|---|
| private final String symbol The symbol of this prefix, as returned by
| |
| TEBI | back to summary |
|---|---|
| public static final BinaryPrefix TEBI Prefix for 10244. | |
| YOBI | back to summary |
|---|---|
| public static final BinaryPrefix YOBI Prefix for 10248. | |
| ZEBI | back to summary |
|---|---|
| public static final BinaryPrefix ZEBI Prefix for 10247. | |
| BinaryPrefix | back to summary |
|---|---|
| private BinaryPrefix(String symbol, int exponent) Creates a new prefix.
| |
| EXBI | back to summary |
|---|---|
| public static <Q extends Quantity Returns the specified unit multiplied by the factor | |
| getExponent | back to summary |
|---|---|
| public int getExponent() Implements javax. Exponent part of the associated factor in
| |
| getName | back to summary |
|---|---|
| public String getName() Implements javax. Returns the name of this prefix. | |
| getSymbol | back to summary |
|---|---|
| public String getSymbol() Implements javax. Returns the symbol of this prefix. | |
| getValue | back to summary |
|---|---|
| public Integer getValue() Implements javax. Base part of the associated factor in
| |
| GIBI | back to summary |
|---|---|
| public static <Q extends Quantity Returns the specified unit multiplied by the factor | |
| KIBI | back to summary |
|---|---|
| public static <Q extends Quantity Returns the specified unit multiplied by the factor | |
| MEBI | back to summary |
|---|---|
| public static <Q extends Quantity Returns the specified unit multiplied by the factor | |
| PEBI | back to summary |
|---|---|
| public static <Q extends Quantity Returns the specified unit multiplied by the factor | |
| TEBI | back to summary |
|---|---|
| public static <Q extends Quantity Returns the specified unit multiplied by the factor | |
| valueOf | back to summary |
|---|---|
| public static BinaryPrefix valueOf(String name) | |
| values | back to summary |
|---|---|
| public static BinaryPrefix[] values() | |
| YOBI | back to summary |
|---|---|
| public static <Q extends Quantity Returns the specified unit multiplied by the factor | |
| ZEBI | back to summary |
|---|---|
| public static <Q extends Quantity Returns the specified unit multiplied by the factor | |