The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

GenOO::RegionCollection::Factory::RegionArray - Factory for creating a RegionCollection from array of regions

SYNOPSIS

    # Creates GenOO::RegionCollection from a array of L<Region> objects

    # Preferably use it through the generic GenOO::RegionCollection::Factory
    my $factory = GenOO::RegionCollection::Factory->new('RegionArray',
        {
            array => \@array_with_regions
        }
    );

DESCRIPTION

    An instance of this class is a concrete factory for the creation of a 
    L<GenOO::RegionCollection> from an array of L<Region> objects. It offers the method 
    "read_collection" (as the consumed role requires) which returns the actual
    L<GenOO::RegionCollection> object in the form of 
    L<GenOO::RegionCollection::Type::DoubleHashArray>. The latter is the implementation
    of the L<GenOO::RegionCollection> class based on the complex data structure
    L<GenOO::Data::Structure::DoubleHashArray>.

EXAMPLES

    # Create a concrete factory
    my $factory_implementation = GenOO::RegionCollection::Factory->new('RegionArray',
        {
             array => \@array_with_regions
        }
    );
    
    # Return the actual GenOO::RegionCollection object
    my $collection = $factory_implementation->read_collection;
    print ref($collection) # GenOO::RegionCollection::Type::DoubleHashArray