ensureNonNull("operations", operations, i);
final CoordinateOperation op = operations[i];
if (op instanceof SingleOperation) {
target.add((SingleOperation) op);
} else if (op instanceof ConcatenatedOperation) {
final ConcatenatedOperation cop = (ConcatenatedOperation) op;
final List<SingleOperation> cops = cop.getOperations();
expand(cops.toArray(new CoordinateOperation[cops.size()]), target, factory, false);
} else {
throw new IllegalArgumentException(Errors.format(ErrorKeys.ILLEGAL_CLASS_$2,
Classes.getClass(op), SingleOperation.class));
}