if (args.getTail() == null)
{
return create(args.getHead(), query, key, nOutput);
}
BinaryOperator op = create(query);
if (!op.setLeft(query.createOperator(key, args.getHead(), nOutput)))
{
return null;
}
args = (Pair)args.getTail();
for (;;)
{
if (!op.setRight(query.createOperator(key, args.getHead(), nOutput)))
{
return null;
}
if (args.getTail() == null)
{
break;
}
BinaryOperator right = create(query);
right.setLeft(op);
op = right;
args = args.getNext();
}
return op;