# ***********************************************
# 
# !!!! DO NOT EDIT !!!!
# 
# This file was auto-generated by Build.PL.
# 
# ***********************************************
# 
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
# 
#     http://www.apache.org/licenses/LICENSE-2.0
# 
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

=encoding utf8

=head1 NAME

Clownfish::Hash - Hashtable.

=head1 SYNOPSIS

    my $hash = Clownfish::Hash->new;
    $hash->store($key, $value);
    my $value = $hash->fetch($key);

=head1 DESCRIPTION

Values are stored by reference and may be any kind of Obj.

=head1 CONSTRUCTORS

=head2 new

    my $hash = Clownfish::Hash->new(
        capacity => $capacity,  # default: 0
    );

Return a new Hash.

=over

=item *

B<capacity> - The number of elements that the hash will be asked to
hold initially.

=back

=head1 METHODS

=head2 clear

    $hash->clear();

Empty the hash of all key-value pairs.

=head2 store

    $hash->store($key, $value);

Store a key-value pair.

=head2 fetch

    my $obj = $hash->fetch($key);

Fetch the value associated with C<key>.

Returns: the value, or undef if C<key> is not present.

=head2 delete

    my $obj = $hash->delete($key);

Attempt to delete a key-value pair from the hash.

Returns: the value if C<key> exists and thus deletion
succeeds; otherwise undef.

=head2 has_key

    my $bool = $hash->has_key($key);

Indicate whether the supplied C<key> is present.

=head2 keys

    my $arrayref = $hash->keys();

Return the Hash’s keys.

=head2 values

    my $arrayref = $hash->values();

Return the Hash’s values.

=head2 get_size

    my $int = $hash->get_size();

Return the number of key-value pairs.

=head1 INHERITANCE

Clownfish::Hash isa L<Clownfish::Obj>.

=cut

