Iterator.next

Returns an iterator pointing to the next entry.

Arguments

None

Return values

iterator
pointing to the next entry.

Complexity

Constant. Amortized constant and Log(size) in the worst case for RedBlackTreeIterator.

Example

"sl/array" useFile "sl/linkedList" useFile "sl/hashTable" useFile "sl/redBlackTree" useFile a: (1 2 3) makeArray; l: (4 5 6) makeList; ht: ((1 "ONE") (2 "TWO") (3 "THREE")) makeHashTable; rb: ((4 "FOUR") (5 "FIVE") (6 "SIX")) makeRedBlackTree; a.firstIter.next.get print LF print l.firstIter.next.get print LF print ht.firstIter.next.get print LF print rb.firstIter.next.get print
Output:
2 5 { key: 2; value: "TWO"; } { key: 5; value: "FIVE"; }