MapKeys[K: K, V: V, H: HashFunction[K] val, M: HashMap[K, V, H] #read]¶
An iterator over the keys in a map.
class ref MapKeys[K: K, V: V, H: HashFunction[K] val, M: HashMap[K, V, H] #read] is
Iterator[M->K] ref
Implements¶
- Iterator[M->K] ref
Constructors¶
create¶
Creates an iterator for the given map.
new ref create(
map: M)
: MapKeys[K, V, H, M] ref^
Parameters¶
- map: M
Returns¶
- MapKeys[K, V, H, M] ref^
Public Functions¶
has_next¶
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¶
- Bool val
next¶
Returns the next key, or raises an error if there isn't one. If keys are added during iteration, this may not return all keys.
fun ref next()
: M->K ?
Returns¶
- M->K ?