I have a method that takes a class that has strings stored in the left hand
side and right hand side like this: A,B> C,D where '>' is the middle delimeter.
I have read in the string correctly, but I am having some trouble doing
manipulation on it. The objects are stored in a LinkedList object. What
I am trying to do is to parse the right side. I take an object that has
a left side of A,B and a right side of C,D. If the right side only has one
token, I insert it into a new list. if it has more than one, I take the
first token, place it with the left side, insert it into the new list. Take
the second token, put it with the left side, insert it into the new list....until
there are no more tokens.
A,B > C,D would become A,B > C and A,B > D.
I am having so trouble with the following code, and being rather new to programming,
I am sure I am just not seeing the flow of the program. Thanks to anyone
who can help.
public static void stepSeven()
System.out.println( "\nlist: " );
for ( int k = 0; k < list.size(); k++ )
// Get the current DbTemplate Object
DbTemplate dbTemplateObject = (DbTemplate)(list.get(k));
// Assign it to the temp DbTemplate object
DbTemplate tmp = new DbTemplate();
tmp = dbTemplateObject;
// Assign the right side of the FD to S
String s = tmp.getRightSide();
// Tokenize the string
w = new StringTokenizer(s, ",");
// More than one token in the right side
if(w.countTokens() > 1)
}// end stepSeven
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center