An iterator over the keys and values in a map.
class ref MapPairs[K: K, V: V, H: HashFunction[K] val, M: HashMap[K, V, H] #read] is Iterator[(M->K , M->V)] ref
Creates an iterator for the given map.
new ref create( map: M) : MapPairs[K, V, H, M] ref^
True if it believes there are remaining entries. May not be right if values were added or removed from the map.
fun box has_next() : Bool val
Returns the next entry, or raises an error if there isn't one. If entries are added during iteration, this may not return all entries.
fun ref next() : (M->K , M->V) ?
© 2016-2018, The Pony Developers
© 2014-2015, Causality Ltd.
Licensed under the BSD 2-Clause License.
https://stdlib.ponylang.io/collections-MapPairs