D
dushkin
Hi,
If I am not at the correct plcae, please alert...
Suppose I have a string with x place holders (P1, P2, P3,...Px).
And I have x arrays of variable length which includes a list of
optional values for each Pi.
How can I effectivly generate a set of all string possibilities?
============================================
Example:
Suppose I have the string xxxxxxxP1xxxxxP2xxxxxP3xxxxx
And I have the following list of values:
For P1: a,b,c
For P2: 1,2,3,4,5,6,7
For P3: i,ii,iii,iv
The number of P's is a variable, and also the lengths of the lists.
The product should be:
xxxxxxxaxxxxx1xxxxxixxxxx
xxxxxxxaxxxxx1xxxxxiixxxxx
xxxxxxxaxxxxx1xxxxxiiixxxxx
xxxxxxxaxxxxx1xxxxxivxxxxx
..
..
xxxxxxxcxxxxx7xxxxxivxxxxx
=========================
Thanks! (java code sample will be very welcomed !!!)
If I am not at the correct plcae, please alert...
Suppose I have a string with x place holders (P1, P2, P3,...Px).
And I have x arrays of variable length which includes a list of
optional values for each Pi.
How can I effectivly generate a set of all string possibilities?
============================================
Example:
Suppose I have the string xxxxxxxP1xxxxxP2xxxxxP3xxxxx
And I have the following list of values:
For P1: a,b,c
For P2: 1,2,3,4,5,6,7
For P3: i,ii,iii,iv
The number of P's is a variable, and also the lengths of the lists.
The product should be:
xxxxxxxaxxxxx1xxxxxixxxxx
xxxxxxxaxxxxx1xxxxxiixxxxx
xxxxxxxaxxxxx1xxxxxiiixxxxx
xxxxxxxaxxxxx1xxxxxivxxxxx
..
..
xxxxxxxcxxxxx7xxxxxivxxxxx
=========================
Thanks! (java code sample will be very welcomed !!!)