implemented convertUnits

This commit is contained in:
pinpong
2016-11-30 19:47:39 +01:00
parent 090b6f13d5
commit 606dc34c4b
3 changed files with 84 additions and 0 deletions
+29
View File
@@ -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;
}
}