ArithmeticValueUpdate.Operator operator = ArithmeticValueUpdate.Operator.getID(opId); double operand = getDouble(null); return new ArithmeticValueUpdate(operator, operand);
ArithmeticValueUpdate.Operator operator = ArithmeticValueUpdate.Operator.getID(opId); double operand = getDouble(null); return new ArithmeticValueUpdate(operator, operand);
/** * Returns the operator with the specified ID. * * @param id the ID to search for * @return the Operator with the specified ID, or null if it does not exist. */ public static Operator getID(int id) { for (Operator operator : Operator.values()) { if (operator.id == id) { return operator; } } return null; } }
@Override public int hashCode() { return super.hashCode() + operator.hashCode() + operand.hashCode(); }