// process all items
// for(int i = 0; i < 3; i++){
for (int i = 0; i < this.substitutionsLiteralLeft.size(); i++) {
// if the item is an unbound variable
final Variable item = this.substitutionsLiteralLeft.get(i);
if ((literal = bindings.get(item)) == null) {
bindings.add(item, this.substitutionsLiteralRight.get(i));
}
// if the item is a variable which is already bound
// and the value differs from the value of the triple
// which would be used as binding, a conflict was
// detected
else if (!literal.valueEquals(this.substitutionsLiteralRight.get(i))) {
return null; // join within triple pattern!
}
}
for (int i = 0; i < this.substitutionsVariableLeft.size(); i++) {
// if the item is an unbound variable
final Variable item = this.substitutionsVariableLeft.get(i);
if ((literal = bindings.get(item)) == null) {
bindings.add(item, oldBinding
.get(this.substitutionsVariableRight.get(i)));
}
// if the item is a variable which is already bound