up: I | index | Zimbu documentation |
Interface allowing a class to be iterated over, with a key. Sketch of how this is used: CLASS Foo<Titem> IMPLEMENTS I.KeyIterable<Tkey, Titem> List<Titem> $container FUNC $KeyIterator() I.Iterator RETURN FooKeyIterator.NEW($container) } }Defining $KeyIterator(), without explicitly adding the IMPLEMENTS, works to use the class with "FOR key, item IN".
|
FUNC $KeyIterator() I.KeyIterator<Tkey, Titem> @abstract @public
|
Copyright 2013 Bram Moolenaar All Rights Reserved. |
Licensed under the Apache License, Version 2.0. See the LICENSE file or obtain a copy at: http://www.apache.org/licenses/LICENSE-2.0 |