D
Denis
Hi all.
I hope you can understand my poor english...
I've two for cycles nested
for (vector1, index i)
for (vector2, index j)
myObject o = new myObject(vector1.elementAt(i),
vector2.elementAt(j))
The problem is that the order of the nested cycles depends of a param.
I could use something like
if (param == true)
x = vector1
y = vector2
else
x = vector2
y = vector1
for (x, index i)
for (y, index j)
if (param == true)
myObject o = new myObject(x.elementAt(i), y.elementAt(j))
else
myObject o = new myObject(y.elementAt(i), x.elementAt(j))
but is there a standard or better method to do this?
Thanks all!
DM
I hope you can understand my poor english...
I've two for cycles nested
for (vector1, index i)
for (vector2, index j)
myObject o = new myObject(vector1.elementAt(i),
vector2.elementAt(j))
The problem is that the order of the nested cycles depends of a param.
I could use something like
if (param == true)
x = vector1
y = vector2
else
x = vector2
y = vector1
for (x, index i)
for (y, index j)
if (param == true)
myObject o = new myObject(x.elementAt(i), y.elementAt(j))
else
myObject o = new myObject(y.elementAt(i), x.elementAt(j))
but is there a standard or better method to do this?
Thanks all!
DM