public static ResultType fromID(char id) throws RPCException { for (ResultType t : ResultType.values()) { if (id == t.id) { return t; } } throw new RPCException(JSONRPCError.MISSING_RESULT_TYPE); }