/** * Binds this variable to the specified value. * * @param term The value to bind this variable to. */ public void setSubstitution(Term term) { Term termToBindTo = term; // When binding against a variable, always bind to its storage cell and not the variable itself. if (termToBindTo instanceof Variable) { Variable variableToBindTo = (Variable) term; termToBindTo = variableToBindTo.getStorageCell(variableToBindTo); } substitution = termToBindTo; }
/** * Binds this variable to the specified value. * * @param term The value to bind this variable to. */ public void setSubstitution(Term term) { Term termToBindTo = term; // When binding against a variable, always bind to its storage cell and not the variable itself. if (termToBindTo instanceof Variable) { Variable variableToBindTo = (Variable) term; termToBindTo = variableToBindTo.getStorageCell(variableToBindTo); } substitution = termToBindTo; }
/** * Binds this variable to the specified value. * * @param term The value to bind this variable to. */ public void setSubstitution(Term term) { Term termToBindTo = term; // When binding against a variable, always bind to its storage cell and not the variable itself. if (termToBindTo instanceof Variable) { Variable variableToBindTo = (Variable) term; termToBindTo = variableToBindTo.getStorageCell(variableToBindTo); } getStorageCell(this).setSubstitution(termToBindTo); }
leftTrail.add(leftVar.getStorageCell(leftVar));
leftTrail.add(leftVar.getStorageCell(leftVar));