public boolean changeVariable(final String var, final String formula) {
        if (!variablesSet.containsKey(var) ||
                Objects.equals((variableMap.get(var) == null ? null : variableMap.get(var).getFormulaString()), formula)) {
            return false;
        }
        variableMap.put(var, formula);
        wasModified = true;
        return true;
    }
returns true if there actually was a change (var is contained and formula is different), false otherwise
main/src/main/java/cgeo/geocaching/utils/formulas/VariableList.java