public static MinerFee fromString(String string) { for (MinerFee fee : MinerFee.values()) { if (fee.tag.equals(string)) { return fee; } } return NORMAL; }
// simply returns the next fee in order of declaration, starts with the first after reaching the // last // useful for cycling through them in sending for example public MinerFee getNext() { return this.ordinal() < MinerFee.values().length - 1 ? MinerFee.values()[this.ordinal() + 1] : MinerFee.values()[0]; }