-
-
27 Feb 2018 08:38:55 UTC
- Distribution: Clownfish
- Source (raw)
- Browse (raw)
- Changes
- Homepage
- How to Contribute
- Clone repository
- Issues
- Testers (1313 / 0 / 7)
- Kwalitee
Bus factor: 0- License: apache_2_0
- Perl: v5.8.3
- Activity
24 month- Tools
- Download (230.31KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
and 1 contributors- The Apache Lucy Project <dev at lucy dot apache dot org>
- Dependencies
- unknown
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
Clownfish::HashIterator - Hashtable Iterator.
SYNOPSIS
my $iter = Clownfish::HashIterator->new($hash); while ($iter->next) { my $key = $iter->get_key; my $value = $iter->get_value; }
DESCRIPTION
CONSTRUCTORS
new
my $iter = Clownfish::HashIterator->new($hash);
Return a HashIterator for
hash
.METHODS
next
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.
get_key
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.
get_value
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.
INHERITANCE
Clownfish::HashIterator isa Clownfish::Obj.
Module Install Instructions
To install Clownfish, copy and paste the appropriate command in to your terminal.
cpanm Clownfish
perl -MCPAN -e shell install Clownfish
For more information on module installation, please visit the detailed CPAN module installation guide.