ListIterator.toString Method [AX 2012]
Returns a textual representation of the current list value that is pointed to by the iterator.
If the iterator points to the first element in the list, the string will contain an indication of this, in the form "(begin)[value]" If the iterator does not point to an element (that is, the more() method returns false), the following string returned is: (end). If the iterator points to a value, the string is "[value]", where value is a string representation of the element value.
The following example prints the following description of the values of the two values in a list:
-
(begin) [2]
-
[1]
{
List li = new List(Types::Integer);
ListIterator it = new ListIterator(li);
li.addStart(1);
li.addStart(2); // This is now the first value
it.begin();
print it.toString();
it.next();
print it.toString();
pause;
}
Community Additions
ADD
Show: