String nextElement()
Returns a String containing the next element.
DtpNoElementAtPositionException - If there is no next element.
The first time you call nextElement(), it returns the element at position zero. In subsequent method calls, nextElement() returns the element at position one, two, three, and so on. You can use nextElement(), along with prevElement(), to navigate the elements (tokens) in a DtpSplitString object.
// Create a DtpSplitString object DtpSplitString MyString = new DtpSplitString("This,is a test",", "); // This call returns element 0 containing "This" String firstElement = MyString.nextElement() // This call returns element 1 containing "is" String secondElement = MyString.nextElement()