package org.ethereum.core;

import java.math.BigInteger;

public enum Denomination {

    WEI(newBigInt(0)),
    ADA(newBigInt(3)),
    BABBAGE(newBigInt(6)),
    SHANNON(newBigInt(9)),
    SZABO(newBigInt(12)),
    FINNEY(newBigInt(15)),
    ETHER(newBigInt(18)),
    EINSTEIN(newBigInt(21)),
    DOUGLAS(newBigInt(42));

    private BigInteger amount;

    private Denomination(BigInteger value) {
        this.amount = value;
    }

    public BigInteger value() {
        return amount;
    }

    public long longValue() {
        return value().longValue();
    }

    private static BigInteger newBigInt(int value) {
        return BigInteger.valueOf(10).pow(value);
    }

    public static String toFriendlyString(BigInteger value) {
        if(value.compareTo(DOUGLAS.value()) == 1 || value.compareTo(DOUGLAS.value()) == 0) {
            return Float.toString(value.divide(DOUGLAS.value()).floatValue()) +  " DOUGLAS";
        }
        else if(value.compareTo(EINSTEIN.value()) == 1 || value.compareTo(EINSTEIN.value()) == 0) {
            return Float.toString(value.divide(EINSTEIN.value()).floatValue()) +  " EINSTEIN";
        }
        else if(value.compareTo(ETHER.value()) == 1 || value.compareTo(ETHER.value()) == 0) {
            return Float.toString(value.divide(ETHER.value()).floatValue()) +  " ETHER";
        }
        else if(value.compareTo(FINNEY.value()) == 1 || value.compareTo(FINNEY.value()) == 0) {
            return Float.toString(value.divide(FINNEY.value()).floatValue()) +  " FINNEY";
        }
        else if(value.compareTo(SZABO.value()) == 1 || value.compareTo(SZABO.value()) == 0) {
            return Float.toString(value.divide(SZABO.value()).floatValue()) +  " SZABO";
        }
        else if(value.compareTo(SHANNON.value()) == 1 || value.compareTo(SHANNON.value()) == 0) {
            return Float.toString(value.divide(SHANNON.value()).floatValue()) +  " SHANNON";
        }
        else if(value.compareTo(BABBAGE.value()) == 1 || value.compareTo(BABBAGE.value()) == 0) {
            return Float.toString(value.divide(BABBAGE.value()).floatValue()) +  " BABBAGE";
        }
        else if(value.compareTo(ADA.value()) == 1 || value.compareTo(ADA.value()) == 0) {
            return Float.toString(value.divide(ADA.value()).floatValue()) +  " ADA";
        }
        else
            return Float.toString(value.divide(WEI.value()).floatValue()) +  " WEI";
    }
}

@@ -106,85 +106,8 @@
 )),%0A
-    ADA(newBigInt(3)),%0A    BABBAGE(newBigInt(6)),%0A    SHANNON(newBigInt(9)),%0A
     
@@ -183,65 +183,8 @@
 18))
-,%0A    EINSTEIN(newBigInt(21)),%0A    DOUGLAS(newBigInt(42))
 ;%0A%0A 
@@ -616,414 +616,9 @@
   if
-(value.compareTo(DOUGLAS.value()) == 1 %7C%7C value.compareTo(DOUGLAS.value()) == 0) %7B%0A            return Float.toString(value.divide(DOUGLAS.value()).floatValue()) +  %22 DOUGLAS%22;%0A        %7D%0A        else if(value.compareTo(EINSTEIN.value()) == 1 %7C%7C value.compareTo(EINSTEIN.value()) == 0) %7B%0A            return Float.toString(value.divide(EINSTEIN.value()).floatValue()) +  %22 EINSTEIN%22;%0A        %7D%0A        else if
+ 
 (val
@@ -1185,595 +1185,8 @@
   %7D%0A
-        else if(value.compareTo(SHANNON.value()) == 1 %7C%7C value.compareTo(SHANNON.value()) == 0) %7B%0A            return Float.toString(value.divide(SHANNON.value()).floatValue()) +  %22 SHANNON%22;%0A        %7D%0A        else if(value.compareTo(BABBAGE.value()) == 1 %7C%7C value.compareTo(BABBAGE.value()) == 0) %7B%0A            return Float.toString(value.divide(BABBAGE.value()).floatValue()) +  %22 BABBAGE%22;%0A        %7D%0A        else if(value.compareTo(ADA.value()) == 1 %7C%7C value.compareTo(ADA.value()) == 0) %7B%0A            return Float.toString(value.divide(ADA.value()).floatValue()) +  %22 ADA%22;%0A        %7D%0A
     

Remove denomination values absent in white paper