SIA ordered 61 B777 (not including SALE's order for 16 planes) in 1995, 28 firm and 33 options. The purchase of the B777-200ER was actually a conversion of options to firm orders.
SIA traded their 17 A340-300E for the 10 B777-200ER not because of fuel economics and why Airbus is not as good(.......), but the MAIN reason is that SIA will not have to go around searching for buyers of those planes.
If SIA were due to retire their A340 fleet, and cannot find buyers for the planes, Boeing is going to help them find buyers, thus saving SIA the trouble of looking for them.
SIA did not trade A340 FOR B777. It was merely an agreement for Boeing to take SIA's A340 fleet and help find buyers for them. I am not sure of any trade agreements between them.
Boeing in turn will sell the planes directly back to Airbus.
If I were Airbus, I will refuse to buy those planes and let Boeing get stuck with those ! (which i believe what Airbus will do if that really happens.