W3cubDocs

/Pony

SetValues[A: A, H: HashFunction[A!] val, S: HashSet[A, H] #read]

[Source]

An iterator over the values in a set.

class ref SetValues[A: A, H: HashFunction[A!] val, S: HashSet[A, H] #read] is
  Iterator[S->A] ref

Implements

Constructors

create

[Source]

Creates an iterator for the given set.

new ref create(
  set: S)
: SetValues[A, H, S] ref^

Parameters

  • set: S

Returns

Public Functions

has_next

[Source]

True if it believes there are remaining entries. May not be right if values were added or removed from the set.

fun box has_next()
: Bool val

Returns

next

[Source]

Returns the next value, or raises an error if there isn't one. If values are added during iteration, this may not return all values.

fun ref next()
: S->A ?

Returns

  • S->A ?

© 2016-2018, The Pony Developers
© 2014-2015, Causality Ltd.
Licensed under the BSD 2-Clause License.
https://stdlib.ponylang.io/collections-SetValues