That's in a loop, so I'd assume that the loop is executed repeatedly. Check whether the loop termination condition works as you expect it to.
By the way, I'm almost positive that the getValue method does not work as you expect it to work. You may want to read about the "switch" statement, and what happens once one of the cases is matched.
Lastly, in the future
UseAMeaningfulSubjectLine that states what the problem is.
[ November 17, 2008: Message edited by: Ulf Dittmer ]