1Clownfish::HashIteratorU(s3e)r Contributed Perl DocumentaCtlioownnfish::HashIterator(3)
2
3
4

NAME

6       Clownfish::HashIterator - Hashtable Iterator.
7

SYNOPSIS

9           my $iter = Clownfish::HashIterator->new($hash);
10           while ($iter->next) {
11               my $key   = $iter->get_key;
12               my $value = $iter->get_value;
13           }
14

DESCRIPTION

CONSTRUCTORS

17   new
18           my $iter = Clownfish::HashIterator->new($hash);
19
20       Return a HashIterator for "hash".
21

METHODS

23   next
24           my $bool = $hash_iterator->next();
25
26       Advance the iterator to the next key-value pair.
27
28       Returns: true if thereXs another key-value pair, false if the iterator
29       is exhausted.
30
31   get_key
32           my $string = $hash_iterator->get_key();
33
34       Return the key of the current key-value pair.  ItXs not allowed to call
35       this method before next() was called for the first time or after the
36       iterator was exhausted.
37
38   get_value
39           my $obj = $hash_iterator->get_value();
40
41       Return the value of the current key-value pair.  ItXs not allowed to
42       call this method before next() was called for the first time or after
43       the iterator was exhausted.
44

INHERITANCE

46       Clownfish::HashIterator isa Clownfish::Obj.
47
48
49
50perl v5.28.1                      2019-02-02        Clownfish::HashIterator(3)
Impressum