NAME
EO::Hash - hash type collection
SYNOPSIS
use EO::Hash;
$hash = EO::Hash->new();
$hash->object_at_index( 'foo', 'bar' );
my $thing = $hash->object_at_index( 'foo' );
$thing->delete( 'foo' );
my $keys = $hash->keys;
my $vals = $hash->values;
my $count = $hash->count;
DESCRIPTION
EO::Hash is an OO wrapper around Perl's hash type.
INHERITANCE
EO::Hash inherits from EO::Collection.
CONSTRUCTOR
EO::Hash provides the following constructors beyond those that the parent class provides:
METHODS
- object_at_index( KEY [, VALUE] )
-
Gets and sets key value pairs. KEY should always be a string. If provided VALUE will be placed in the EO::Hash object at the key KEY.
- delete( KEY )
-
Deletes a key/value pair, indexed by key, from the EO::Hash object.
- count
-
Returns an integer representing the number of key/value pairs in the EO::Hash object.
- iterator
-
Returns a Perl hash.
- keys
-
In scalar context returns an EO::Array object of keys in the EO::Hash. In list context it returns a Perl array of keys in the EO::Hash.
- values
-
In scalar context returns an EO::Array object of values in the EO::Hash. In list context it returns a Perl array of values in the EO::Hash.
SEE ALSO
EO::Collection, EO::Array
AUTHOR
James A. Duncan <jduncan@fotango.com>
COPYRIGHT
Copyright 2003 Fotango Ltd. All Rights Reserved.
This module is released under the same terms as Perl itself.