mirror of
https://github.com/gosticks/iota.lib.java.git
synced 2026-08-30 12:50:24 +00:00
implemented convertUnits
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
package jota.utils;
|
||||
|
||||
/**
|
||||
* Created by pinpong on 30.11.16.
|
||||
*/
|
||||
public enum IotaUnits {
|
||||
IOTA("i", 0),
|
||||
KILO_IOTA("Ki", 3),
|
||||
MEGA_IOTA("Mi", 6),
|
||||
GIGA_IOTA("Gi", 9),
|
||||
TERRA_IOTA("Ti", 12),
|
||||
PETA_IOTA("Pi", 15);
|
||||
|
||||
private String unit;
|
||||
private long value;
|
||||
|
||||
IotaUnits(String unit, long value) {
|
||||
this.unit = unit;
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getUnit() {
|
||||
return unit;
|
||||
}
|
||||
|
||||
public long getValue() {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user