Clownfish::HashIterator - Hashtable Iterator.
my $iter = Clownfish::HashIterator->new($hash); while ($iter->next) { my $key = $iter->get_key; my $value = $iter->get_value; }
my $iter = Clownfish::HashIterator->new($hash);
Return a HashIterator for hash
.
my $bool = $hash_iterator->next();
Advance the iterator to the next key-value pair.
Returns: true if there’s another key-value pair, false if the iterator is exhausted.
my $string = $hash_iterator->get_key();
Return the key of the current key-value pair. It’s not allowed to call this method before next() was called for the first time or after the iterator was exhausted.
my $obj = $hash_iterator->get_value();
Return the value of the current key-value pair. It’s not allowed to call this method before next() was called for the first time or after the iterator was exhausted.
Clownfish::HashIterator isa Clownfish::Obj.
Copyright © 2010-2015 The Apache Software Foundation, Licensed under the
Apache License, Version 2.0.
Apache Lucy, Lucy, Apache, the Apache feather logo, and the Apache Lucy project logo are trademarks of The
Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their
respective owners.