Michael Shipper
and 1 contributors

NAME

Data::Range::Compare::Stream::Iterator::Compare::Base - Abstract class

DESCRIPTION

This module extends Data::Range::Compare::Stream::Iterator::Base and provides the shared hooks for the Compare Asc class and any future compare classes.

OO Methods

  • my $compare=new Data::Range::Compare::Stream::Iterator::Compare::Base;

    Optional arguments:

         factory_instance =>$obj
            
            # defines the object that implements the $obj->factory($start,$end,$data).
            # new ranges are constructed from the factory interfcae.  If a factory interface
            # is not created an instance of Data::Range::Compare::Stream is assumed.
  • $compare->add_consolidator($iterator_a);

        An $iterator object must implement one of the following iterator classes
    
          Data::Range::Compare::Stream::Iterator::Consolidate
           
          Data::Range::Compare::Stream::Iterator::Compare::Asc
    
         my $boolean=$iterator_a->has_next
    
           Boolean value indicating if there are any more ranges
    
         my $result=$iterator_a->get_next;
    
           $result must implement one of the following result objects:
    
             Data::Range::Compare::Stream::Iterator::Consolidate::Result
               
             Data::Range::Compare::Stream::Iterator::Compare::Result
  • while($compare->has_next) { do something }

    Must be implemented See: Data::Range::Compare::Stream::Iterator::Compare::Asc

  • my $result=$compare->get_next;

    Must be implemented See: Data::Range::Compare::Stream::Iterator::Compare::Asc

    Suggested implementation: if $compare->has_next returns true: Returns a instance of Data::Range::Compare::Stream::Iterator::Compare::Result.

  • my $count=$compare->get_column_count_human_readable;

    Returns a human readable count of the columns in the comparison object.

  • my $count=$compare->get_column_count;

    Returns the last index id of the iterator column counts.

  • my $range=$compare->get_current_row;

    Returns the range object that will be used in the $compare->get_next call.

  • my $boolean=$compare->iterators_empty;

    Returns false when all iterator objects in $compare are depleted.

  • my $result=$compare->get_next;

    Must be implemented See: Data::Range::Compare::Stream::Iterator::Compare::Asc

    Suggested implementation: if $compare->has_next returns true: Returns an instance of Data::Range::Compare::Stream::Iterator::Compare::Result.

  • my $id=$compare->insert_consolidator($consolidator);

    Inserts a consolidator object into a prepared and or running $compare object. This interface can be dangerous, use with caution!

  • my $consolidator=$compare->get_iterator_by_id($id);

    Returns the consolidator identified by $id. Fatal if $id does not exist.

  • $compare->set_column_id($id)

    Used to set the column_id for the compare object.

  • my $id=$compare->get_column_id;

    Used to fetch the column_id;

SEE ALSO

Data::Range::Compare::Stream::Iterator::Compare::Asc Data::Range::Compare::Stream::Iterator::Compare::Result Data::Range::Compare::Stream::Iterator::Consolidate::Result Data::Range::Compare::Stream::Iterator::Consolidate Data::Range::Compare::Stream::Cookbook

AUTHOR

Michael Shipper

Source-Forge Project

As of version 0.001 the Project has been moved to Source-Forge.net

Data Range Compare https://sourceforge.net/projects/data-range-comp/

COPYRIGHT

Copyright 2011 Michael Shipper. All rights reserved.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.