# -*- perl -*-
# DO NOT EDIT - This file is generated by UMMF; http://ummf.sourceforge.net 
# From template: $Id: PerlTemplate.txt,v 1.74 2004/08/01 03:50:07 kstephens Exp $

package UMMF::UML::MetaModel::Behavioral_Elements::Actions::Collection_Actions::Reduce::ReduceAction;

#use 5.6.1;
use strict;
use warnings;

#################################################################
# Version
#

our $VERSION = do { my @r = (q{1.0} =~ /\d+/g); sprintf "%d." . "%03d" x $#r, @r };


#################################################################
# Documentation
#

=head1 NAME

UMMF::UML::MetaModel::Behavioral_Elements::Actions::Collection_Actions::Reduce::ReduceAction -- 

=head1 VERSION

1.0

=head1 SYNOPSIS

=head1 DESCRIPTION 

=head1 USAGE

=head1 EXPORT

=head1 METATYPE

L<UMMF::UML::MetaModel::Foundation::Core::Class|UMMF::UML::MetaModel::Foundation::Core::Class>

=head1 SUPERCLASSES

L<UMMF::UML::MetaModel::Behavioral_Elements::Actions::Collection_Actions::CollectionAction|UMMF::UML::MetaModel::Behavioral_Elements::Actions::Collection_Actions::CollectionAction>




=head1 ATTRIBUTES


=head2 C<isUnordered> : UMMF::UML::MetaModel::Foundation::Data_Types::Boolean 


=over 4

=item metatype = L<UMMF::UML::MetaModel::Foundation::Core::Attribute|UMMF::UML::MetaModel::Foundation::Core::Attribute>

=item type = L<UMMF::UML::MetaModel::Foundation::Data_Types::Boolean|UMMF::UML::MetaModel::Foundation::Data_Types::Boolean>

=item visibility = C<private>

=item multiplicity = C<1>

=item changeability = C<changeable>

=item targetScope = C<instance>

=item ordering = C<unordered>

=item initialValue = I<UNSPECIFIED>

=item container_type = C<Set::Object>

=back



=head1 ASSOCIATIONS


=head2 C<0..1> : C<> ----E<gt>  C<leftSubinput> : UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin C<1..*>



=over 4

=item metatype = L<UMMF::UML::MetaModel::Foundation::Core::AssociationEnd|UMMF::UML::MetaModel::Foundation::Core::AssociationEnd>

=item type = L<UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin|UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin>

=item multiplicity = C<1..*>

=item changeability = C<changeable>

=item targetScope = C<instance>

=item ordering = C<ordered>

=item isNavigable = C<1>

=item aggregation = C<none>

=item visibility = C<public>

=item container_type = C<ARRAY>

=back


=head2 C<0..1> : C<> ----E<gt>  C<rightSubinput> : UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin C<1..*>



=over 4

=item metatype = L<UMMF::UML::MetaModel::Foundation::Core::AssociationEnd|UMMF::UML::MetaModel::Foundation::Core::AssociationEnd>

=item type = L<UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin|UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin>

=item multiplicity = C<1..*>

=item changeability = C<changeable>

=item targetScope = C<instance>

=item ordering = C<ordered>

=item isNavigable = C<1>

=item aggregation = C<none>

=item visibility = C<public>

=item container_type = C<ARRAY>

=back


=head2 C<0..1> : C<> ----E<gt>  C<suboutput> : UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin C<1..*>



=over 4

=item metatype = L<UMMF::UML::MetaModel::Foundation::Core::AssociationEnd|UMMF::UML::MetaModel::Foundation::Core::AssociationEnd>

=item type = L<UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin|UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin>

=item multiplicity = C<1..*>

=item changeability = C<changeable>

=item targetScope = C<instance>

=item ordering = C<ordered>

=item isNavigable = C<1>

=item aggregation = C<none>

=item visibility = C<public>

=item container_type = C<ARRAY>

=back



=head1 METHODS

=cut



#################################################################
# Dependencies
#





use Carp qw(croak confess);
use Set::Object 1.05;
use Class::Multimethods 1.70;
use Data::Dumper;
use Scalar::Util qw(weaken);
use UMMF::UML::MetaModel::__ObjectBase qw(:__ummf_array);


#################################################################
# Generalizations
#

use base qw(
  UMMF::UML::MetaModel::Behavioral_Elements::Actions::Collection_Actions::CollectionAction



);


#################################################################
# Exports
#

our @EXPORT_OK = qw(
);
our %EXPORT_TAGS = ( 'all' => \@EXPORT_OK );





#################################################################
# Validation
#


=head2 C<__validate_type>

  UMMF::UML::MetaModel::Behavioral_Elements::Actions::Collection_Actions::Reduce::ReduceAction->__validate_type($value);

Returns true if C<$value> is a valid representation of L<UMMF::UML::MetaModel::Behavioral_Elements::Actions::Collection_Actions::Reduce::ReduceAction|UMMF::UML::MetaModel::Behavioral_Elements::Actions::Collection_Actions::Reduce::ReduceAction>.

=cut
sub __validate_type($$)
{
  my ($self, $x) = @_;

  no warnings;

  UNIVERSAL::isa($x, 'UMMF::UML::MetaModel::Behavioral_Elements::Actions::Collection_Actions::Reduce::ReduceAction')  ;
}


=head2 C<__typecheck>

  UMMF::UML::MetaModel::Behavioral_Elements::Actions::Collection_Actions::Reduce::ReduceAction->__typecheck($value, $msg);

Calls C<confess()> with C<$msg> if C<<UMMF::UML::MetaModel::Behavioral_Elements::Actions::Collection_Actions::Reduce::ReduceAction->__validate_type($value)>> is false.

=cut
sub __typecheck
{
  my ($self, $x, $msg) = @_;

  confess("typecheck: $msg: type '" . 'UMMF::UML::MetaModel::Behavioral_Elements::Actions::Collection_Actions::Reduce::ReduceAction' . ": value '$x'")
    unless __validate_type($self, $x);
}


=head2 C<isaReduceAction>


Returns true if receiver is a L<UMMF::UML::MetaModel::Behavioral_Elements::Actions::Collection_Actions::Reduce::ReduceAction|UMMF::UML::MetaModel::Behavioral_Elements::Actions::Collection_Actions::Reduce::ReduceAction>.
Other receivers will return false.

=cut
sub isaReduceAction { 1 }


=head2 C<isaBehavioral_Elements__Actions__Collection_Actions__Reduce__ReduceAction>


Returns true if receiver is a L<UMMF::UML::MetaModel::Behavioral_Elements::Actions::Collection_Actions::Reduce::ReduceAction|UMMF::UML::MetaModel::Behavioral_Elements::Actions::Collection_Actions::Reduce::ReduceAction>.
Other receivers will return false.
This is the fully qualified version of the C<isaReduceAction> method.

=cut
sub isaBehavioral_Elements__Actions__Collection_Actions__Reduce__ReduceAction { 1 }


#################################################################
# Introspection
#

=head2 C<__model_name> 

  my $name = $obj_or_package->__model_name;

Returns the UML Model name (C<'Behavioral_Elements::Actions::Collection_Actions::Reduce::ReduceAction'>) for an object or package of
this Classifier.

=cut
sub __model_name { 'Behavioral_Elements::Actions::Collection_Actions::Reduce::ReduceAction' }



=head2 C<__isAbstract>

  $package->__isAbstract;

Returns C<0>.

=cut
sub __isAbstract { 0; }


my $__tangram_schema;
=head2 C<__tangram_schema>

  my $tangram_schema $obj_or_package->__tangram_schema

Returns a HASH ref that describes this Classifier for Tangram.

See L<UMMF::UML::Export::Perl::Tangram|UMMF::UML::Export::Perl::Tangram>

=cut
sub __tangram_schema
{
  my ($self) = @_;

  $__tangram_schema ||=
  {
   'classes' =>
   [
     'UMMF::UML::MetaModel::Behavioral_Elements::Actions::Collection_Actions::Reduce::ReduceAction' =>
     {
       'table' => 'Behavioral_Elements__Actions__Collection_Actions__Reduce__ReduceAction',
       'abstract' => 0,
       'slots' => 
       { 
	 # Attributes
	 	       'isUnordered'
       => {
	 'type_impl' => 'string',
                                             'col' => 'isUnordered', 

                                                                                                                   }
      ,
         
	 # Associations
	 	 	       'leftSubinput'
       => {
	 'type_impl' => 'iarray',
         'class' => 'UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin',

                           'table' => 'Behavioral_Elements__Actions__Collection_Actions__Reduce__ReduceAction__leftSubinput', 

                                                               'coll' => 'reduceAction',

                  'slot' => 'reduceAction_i', 

                                    'aggreg' => '1', 

                                           }
      ,
                  	 	       'rightSubinput'
       => {
	 'type_impl' => 'iarray',
         'class' => 'UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin',

                           'table' => 'Behavioral_Elements__Actions__Collection_Actions__Reduce__ReduceAction__rightSubinput', 

                                                               'coll' => 'reduceAction',

                  'slot' => 'reduceAction_i', 

                                    'aggreg' => '1', 

                                           }
      ,
                  	 	       'suboutput'
       => {
	 'type_impl' => 'iarray',
         'class' => 'UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin',

                           'table' => 'Behavioral_Elements__Actions__Collection_Actions__Reduce__ReduceAction__suboutput', 

                                                               'coll' => 'reduceAction',

                  'slot' => 'reduceAction_i', 

                                                                      }
      ,
                         },
       'bases' => [  'UMMF::UML::MetaModel::Behavioral_Elements::Actions::Collection_Actions::CollectionAction',  ],
       'sql' => {

       },
     },
   ],

   'sql' =>
   {
    # Note Tangram::Ref::get_exporter() has
    # "UPDATE $table SET $self->{col} = $refid WHERE id = $id",
    # The id_col is hard-coded, 
    # Thus id_col will not work.
    #'id_col' => '__sid',
    #'class_col' => '__stype',
   },
     # 'set_id' => sub { }
     # 'get_id' => sub { }

      
  };
}


#################################################################
# Class Attributes
#


      

#################################################################
# Class Associations
#


    

#################################################################
# Initialization
#


=head2 C<___initialize>

Initialize all Attributes and AssociationEnds in a instance of this Classifier.
Does B<not> initalize slots in its Generalizations.

See also: C<__initialize>.

=cut
sub ___initialize
{
  my ($self) = @_;

  # Attributes

    # Attribute isUnordered
  if ( exists $self->{'isUnordered'} ) {
    my $x = $self->{'isUnordered'};
    $self->{'isUnordered'} = undef;
    $self->set_isUnordered($x);
  } else {
      }
  


  # Associations

  # AssociationEnd 
  #   0..1
  #  <--> 
  #  leftSubinput 1..* UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin.
    if ( defined $self->{'leftSubinput'} ) {
    my $x = $self->{'leftSubinput'};
        $self->{'leftSubinput'} = [ ];
        $self->set_leftSubinput(@$x);
  }
  
  # AssociationEnd 
  #   0..1
  #  <--> 
  #  rightSubinput 1..* UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin.
    if ( defined $self->{'rightSubinput'} ) {
    my $x = $self->{'rightSubinput'};
        $self->{'rightSubinput'} = [ ];
        $self->set_rightSubinput(@$x);
  }
  
  # AssociationEnd 
  #   0..1
  #  <--> 
  #  suboutput 1..* UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin.
    if ( defined $self->{'suboutput'} ) {
    my $x = $self->{'suboutput'};
        $self->{'suboutput'} = [ ];
        $self->set_suboutput(@$x);
  }
  

  $self;
}


my $__initialize_use;

=head2 C<__initialize>

Initialize all slots in this Classifier and all its Generalizations.

See also: C<___initialize>.

=cut
sub __initialize
{
  my ($self) = @_;

  # $DB::single = 1;

  unless ( ! $__initialize_use ) {
    $__initialize_use = 1;
    $self->__use('UMMF::UML::MetaModel::Foundation::Core::Element');
    $self->__use('UMMF::UML::MetaModel::Foundation::Core::ModelElement');
    $self->__use('UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::Action');
    $self->__use('UMMF::UML::MetaModel::Behavioral_Elements::Actions::Collection_Actions::CollectionAction');
  }

  $self->UMMF::UML::MetaModel::Behavioral_Elements::Actions::Collection_Actions::Reduce::ReduceAction::___initialize;
  $self->UMMF::UML::MetaModel::Foundation::Core::Element::___initialize;
  $self->UMMF::UML::MetaModel::Foundation::Core::ModelElement::___initialize;
  $self->UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::Action::___initialize;
  $self->UMMF::UML::MetaModel::Behavioral_Elements::Actions::Collection_Actions::CollectionAction::___initialize;

  $self;
}
      

=head2 C<__create>

Calls all <<create>> Methods for this Classifier and all Generalizations.

See also: C<___create>.

=cut
sub __create
{
  my ($self, @args) = @_;

  # $DB::single = 1;
  $self->UMMF::UML::MetaModel::Behavioral_Elements::Actions::Collection_Actions::Reduce::ReduceAction::___create(@args);
  $self->UMMF::UML::MetaModel::Foundation::Core::Element::___create();
  $self->UMMF::UML::MetaModel::Foundation::Core::ModelElement::___create();
  $self->UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::Action::___create();
  $self->UMMF::UML::MetaModel::Behavioral_Elements::Actions::Collection_Actions::CollectionAction::___create();

  $self;
}




#################################################################
# Attributes
#



=for html <hr/>

=cut

#################################################################
# Attribute isUnordered
# type = UMMF::UML::MetaModel::Foundation::Data_Types::Boolean
# multiplicity = 1
# ordering = unordered
# ownerScope = instance
# initialValue = 

=head2 C<isUnordered>

  my $val = $obj->isUnordered;

Returns the L<UMMF::UML::MetaModel::Foundation::Data_Types::Boolean|UMMF::UML::MetaModel::Foundation::Data_Types::Boolean> value of Attribute C<isUnordered>.

=cut
sub isUnordered ($)
{
  my ($self) = @_;

  ;

  my $val = $self->{'isUnordered'};

  ;

  $val;
}


=head2 C<set_isUnordered>

  $obj->set_isUnordered($val);

Sets the value of Attribute C<isUnordered>.
C<$val> must be of type L<UMMF::UML::MetaModel::Foundation::Data_Types::Boolean|UMMF::UML::MetaModel::Foundation::Data_Types::Boolean> or C<undef>.
Returns C<$obj>.

=cut
sub set_isUnordered ($$)
{
  my ($self, $val) = @_;

  ;

  if ( defined $val ) {
    ;
  }

    $self->{'isUnordered'} = $val
  ;

  ;

  $self;
}


=head2 C<count_isUnordered>

  $obj->count_isUnordered;

Returns the number of elements (0 or 1) in C<isUnordered>.

=cut
sub count_isUnordered ($)
{
  my ($self) = @_;

  ;

  my $val = $self->{'isUnordered'};

  ;

  defined $val ? 1 : 0;
}




#################################################################
# Association
#


=for html <hr/>

=cut

#################################################################
# AssociationEnd  <---> leftSubinput
# type = UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin
# multiplicity = 1..*
# ordering = ordered

=head2 C<leftSubinput>

  my @val = $obj->leftSubinput;
  my $ary_val = $obj->leftSubinput;

Returns the AssociationEnd C<leftSubinput> values of type L<UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin|UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin>.
In array context, returns all the objects in the Association.
In scalar context, returns an array ref of all the objects in the Association.

=cut
sub leftSubinput ($)
{
  my ($self) = @_;

    my $x = $self->{'leftSubinput'} ||= [ ];

  wantarray ? @{$x} : $x;
  
}


=head2 C<index_leftSubinput>

  my $x = $obj->index_leftSubinput($i);
  my @x = $obj->index_leftSubinput($i, $count);

In scalar context, returns the value of AssociationEnd C<leftSubinput> at index C<$i>.
In array context, returns the values between index C<$i> and C<$i + $count - 1>, inclusive.

=cut
sub index_leftSubinput ($$@)
{
  my ($self, $i, $count) = @_;

  ;

  my $val = $self->{'leftSubinput'} ||= [ ];

  ;

  wantarray ? $val->[$i .. (defined $count ? $i + $count - 1 : $i)]
            : $val->[$i];
}


=head2 C<index_of_leftSubinput>

  my $index = $obj->index_of_leftSubinput($val);

Returns the index of C<$val> in AssociationEnd C<leftSubinput>.
Return C<undef> if C<$val> is not in C<leftSubinput>.

=cut
sub index_of_leftSubinput ($$)
{
  my ($self, $x) = @_;

  ;

  my $val = $self->{'leftSubinput'} ||= [ ];

  ;

  __ummf_array_index($val, $x);
}


=head2 C<set_leftSubinput>

  $obj->set_leftSubinput(@val);

Sets the AssociationEnd C<leftSubinput> value.
Elements of C<@val> must of type L<UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin|UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin>.
Returns C<$obj>.

=cut
sub set_leftSubinput ($@)
{
  my ($self, @val) = @_;
  
  $self->clear_leftSubinput;
  $self->add_leftSubinput(@val);
}


=head2 C<set_index_leftSubinput>

  $obj->set_index_leftSubinput($i, $val);

Sets the value of AssociationEnd C<leftSubinput> at index C<$i>.
Returns self.

=cut
sub set_index_leftSubinput ($$$)
{
  my ($self, $i, $val) = @_;

  ;

  my $x = $self->{'leftSubinput'} ||= [ ];

  no warnings;
  my $old;
  if ( ($old = $x->[$i]) ne $val) {
    # Recursion lock
        $x->[$i] = $val
    ;

    # Remove and add associations with other ends.
        
    ;
  }

  $self;
}


=head2 C<add_leftSubinput>

  $obj->add_leftSubinput(@val);

Adds AssociationEnd C<leftSubinput> values.
Elements of C<@val> must of type L<UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin|UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin>.
Returns C<$obj>.

=cut
sub add_leftSubinput ($@)
{
  my ($self, @val) = @_;
  
    my $x = $self->{'leftSubinput'} ||= [ ];
    my $old; # Place holder for other MACRO.
  
  for my $val ( @val ) {
    # Recursion lock
        next if grep($_ eq $val, @$x);
        $self->__use('UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin')->__typecheck($val, "UMMF::UML::MetaModel::Behavioral_Elements::Actions::Collection_Actions::Reduce::ReduceAction.leftSubinput");

    # Recursion lock
        push(@{$x}, $val);
        
    # Remove and add associations with other ends.
          }
  
  $self;
}


=head2 C<add_index_leftSubinput>

  $obj->add_index_leftSubinput($i, @val);

Adds AssociationEnd C<leftSubinput> values at index C<$i>.
Elements of C<@val> must of type L<UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin|UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin>.
Returns C<$obj>.

=cut
sub add_index_leftSubinput ($$@)
{
  my ($self, $i, @val) = @_;

  
    my $x = $self->{'leftSubinput'} ||= [ ];
    my $old; # Place holder for other MACRO.
  
  for my $val ( @val ) {
    # Recursion lock
        next if grep($_ eq $val, @$x);
        $self->__use('UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin')->__typecheck($val, "UMMF::UML::MetaModel::Behavioral_Elements::Actions::Collection_Actions::Reduce::ReduceAction.leftSubinput");

    # Recursion lock
        splice(@{$x}, $i, 0, $val); # Recursion lock
        ++ $i;
    
    # Remove and add associations with other ends.
          }
  
  
  $self;
}


=head2 C<remove_leftSubinput>

  $obj->remove_leftSubinput(@val);

Removes the AssociationEnd C<leftSubinput> values C<@val>.
Elements of C<@val> must of type L<UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin|UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin>.
Returns C<$obj>.

=cut
sub remove_leftSubinput ($@)
{
  my ($self, @val) = @_;
  
    my $x = $self->{'leftSubinput'} ||= [ ];
  
  for my $old ( @val ) {
    # Recursion lock
        my $i; # index of $old in @$x.
    next unless defined($i = __ummf_array_index($x, $old));
    
    my $val = $old;
      
    $self->__use('UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin')->__typecheck($val, "UMMF::UML::MetaModel::Behavioral_Elements::Actions::Collection_Actions::Reduce::ReduceAction.leftSubinput");

    # Recursion lock
        splice(@$x, $i, 1);     
    $val = undef;

    # Remove associations with other ends.

        ;

  }
  
  $self;
}


=head2 C<clear_leftSubinput>

  $obj->clear_leftSubinput;

Clears the AssociationEnd C<leftSubinput> links to L<UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin|UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin>.
Returns C<$obj>.

=cut
sub clear_leftSubinput ($) 
{
  my ($self) = @_;
  
    my $x = $self->{'leftSubinput'} ||= [ ];
  
  my $val; # Place holder for other MACRO.
  
    $self->{'leftSubinput'} = [ ];  # Recursion lock
  for my $old ( @$x ) { # Recursion lock
  
    # Remove associations with other ends.

        ;

  }
  
  $self;
}


=head2 C<count_leftSubinput>

  $obj->count_leftSubinput;

Returns the number of elements associated with C<leftSubinput>.

=cut
sub count_leftSubinput ($)
{
  my ($self) = @_;

  my $x = $self->{'leftSubinput'};

    defined $x ? scalar @$x : 0;
  }




=for html <hr/>

=cut

#################################################################
# AssociationEnd  <---> rightSubinput
# type = UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin
# multiplicity = 1..*
# ordering = ordered

=head2 C<rightSubinput>

  my @val = $obj->rightSubinput;
  my $ary_val = $obj->rightSubinput;

Returns the AssociationEnd C<rightSubinput> values of type L<UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin|UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin>.
In array context, returns all the objects in the Association.
In scalar context, returns an array ref of all the objects in the Association.

=cut
sub rightSubinput ($)
{
  my ($self) = @_;

    my $x = $self->{'rightSubinput'} ||= [ ];

  wantarray ? @{$x} : $x;
  
}


=head2 C<index_rightSubinput>

  my $x = $obj->index_rightSubinput($i);
  my @x = $obj->index_rightSubinput($i, $count);

In scalar context, returns the value of AssociationEnd C<rightSubinput> at index C<$i>.
In array context, returns the values between index C<$i> and C<$i + $count - 1>, inclusive.

=cut
sub index_rightSubinput ($$@)
{
  my ($self, $i, $count) = @_;

  ;

  my $val = $self->{'rightSubinput'} ||= [ ];

  ;

  wantarray ? $val->[$i .. (defined $count ? $i + $count - 1 : $i)]
            : $val->[$i];
}


=head2 C<index_of_rightSubinput>

  my $index = $obj->index_of_rightSubinput($val);

Returns the index of C<$val> in AssociationEnd C<rightSubinput>.
Return C<undef> if C<$val> is not in C<rightSubinput>.

=cut
sub index_of_rightSubinput ($$)
{
  my ($self, $x) = @_;

  ;

  my $val = $self->{'rightSubinput'} ||= [ ];

  ;

  __ummf_array_index($val, $x);
}


=head2 C<set_rightSubinput>

  $obj->set_rightSubinput(@val);

Sets the AssociationEnd C<rightSubinput> value.
Elements of C<@val> must of type L<UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin|UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin>.
Returns C<$obj>.

=cut
sub set_rightSubinput ($@)
{
  my ($self, @val) = @_;
  
  $self->clear_rightSubinput;
  $self->add_rightSubinput(@val);
}


=head2 C<set_index_rightSubinput>

  $obj->set_index_rightSubinput($i, $val);

Sets the value of AssociationEnd C<rightSubinput> at index C<$i>.
Returns self.

=cut
sub set_index_rightSubinput ($$$)
{
  my ($self, $i, $val) = @_;

  ;

  my $x = $self->{'rightSubinput'} ||= [ ];

  no warnings;
  my $old;
  if ( ($old = $x->[$i]) ne $val) {
    # Recursion lock
        $x->[$i] = $val
    ;

    # Remove and add associations with other ends.
        
    ;
  }

  $self;
}


=head2 C<add_rightSubinput>

  $obj->add_rightSubinput(@val);

Adds AssociationEnd C<rightSubinput> values.
Elements of C<@val> must of type L<UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin|UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin>.
Returns C<$obj>.

=cut
sub add_rightSubinput ($@)
{
  my ($self, @val) = @_;
  
    my $x = $self->{'rightSubinput'} ||= [ ];
    my $old; # Place holder for other MACRO.
  
  for my $val ( @val ) {
    # Recursion lock
        next if grep($_ eq $val, @$x);
        $self->__use('UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin')->__typecheck($val, "UMMF::UML::MetaModel::Behavioral_Elements::Actions::Collection_Actions::Reduce::ReduceAction.rightSubinput");

    # Recursion lock
        push(@{$x}, $val);
        
    # Remove and add associations with other ends.
          }
  
  $self;
}


=head2 C<add_index_rightSubinput>

  $obj->add_index_rightSubinput($i, @val);

Adds AssociationEnd C<rightSubinput> values at index C<$i>.
Elements of C<@val> must of type L<UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin|UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin>.
Returns C<$obj>.

=cut
sub add_index_rightSubinput ($$@)
{
  my ($self, $i, @val) = @_;

  
    my $x = $self->{'rightSubinput'} ||= [ ];
    my $old; # Place holder for other MACRO.
  
  for my $val ( @val ) {
    # Recursion lock
        next if grep($_ eq $val, @$x);
        $self->__use('UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin')->__typecheck($val, "UMMF::UML::MetaModel::Behavioral_Elements::Actions::Collection_Actions::Reduce::ReduceAction.rightSubinput");

    # Recursion lock
        splice(@{$x}, $i, 0, $val); # Recursion lock
        ++ $i;
    
    # Remove and add associations with other ends.
          }
  
  
  $self;
}


=head2 C<remove_rightSubinput>

  $obj->remove_rightSubinput(@val);

Removes the AssociationEnd C<rightSubinput> values C<@val>.
Elements of C<@val> must of type L<UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin|UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin>.
Returns C<$obj>.

=cut
sub remove_rightSubinput ($@)
{
  my ($self, @val) = @_;
  
    my $x = $self->{'rightSubinput'} ||= [ ];
  
  for my $old ( @val ) {
    # Recursion lock
        my $i; # index of $old in @$x.
    next unless defined($i = __ummf_array_index($x, $old));
    
    my $val = $old;
      
    $self->__use('UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin')->__typecheck($val, "UMMF::UML::MetaModel::Behavioral_Elements::Actions::Collection_Actions::Reduce::ReduceAction.rightSubinput");

    # Recursion lock
        splice(@$x, $i, 1);     
    $val = undef;

    # Remove associations with other ends.

        ;

  }
  
  $self;
}


=head2 C<clear_rightSubinput>

  $obj->clear_rightSubinput;

Clears the AssociationEnd C<rightSubinput> links to L<UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin|UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin>.
Returns C<$obj>.

=cut
sub clear_rightSubinput ($) 
{
  my ($self) = @_;
  
    my $x = $self->{'rightSubinput'} ||= [ ];
  
  my $val; # Place holder for other MACRO.
  
    $self->{'rightSubinput'} = [ ];  # Recursion lock
  for my $old ( @$x ) { # Recursion lock
  
    # Remove associations with other ends.

        ;

  }
  
  $self;
}


=head2 C<count_rightSubinput>

  $obj->count_rightSubinput;

Returns the number of elements associated with C<rightSubinput>.

=cut
sub count_rightSubinput ($)
{
  my ($self) = @_;

  my $x = $self->{'rightSubinput'};

    defined $x ? scalar @$x : 0;
  }




=for html <hr/>

=cut

#################################################################
# AssociationEnd  <---> suboutput
# type = UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin
# multiplicity = 1..*
# ordering = ordered

=head2 C<suboutput>

  my @val = $obj->suboutput;
  my $ary_val = $obj->suboutput;

Returns the AssociationEnd C<suboutput> values of type L<UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin|UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin>.
In array context, returns all the objects in the Association.
In scalar context, returns an array ref of all the objects in the Association.

=cut
sub suboutput ($)
{
  my ($self) = @_;

    my $x = $self->{'suboutput'} ||= [ ];

  wantarray ? @{$x} : $x;
  
}


=head2 C<index_suboutput>

  my $x = $obj->index_suboutput($i);
  my @x = $obj->index_suboutput($i, $count);

In scalar context, returns the value of AssociationEnd C<suboutput> at index C<$i>.
In array context, returns the values between index C<$i> and C<$i + $count - 1>, inclusive.

=cut
sub index_suboutput ($$@)
{
  my ($self, $i, $count) = @_;

  ;

  my $val = $self->{'suboutput'} ||= [ ];

  ;

  wantarray ? $val->[$i .. (defined $count ? $i + $count - 1 : $i)]
            : $val->[$i];
}


=head2 C<index_of_suboutput>

  my $index = $obj->index_of_suboutput($val);

Returns the index of C<$val> in AssociationEnd C<suboutput>.
Return C<undef> if C<$val> is not in C<suboutput>.

=cut
sub index_of_suboutput ($$)
{
  my ($self, $x) = @_;

  ;

  my $val = $self->{'suboutput'} ||= [ ];

  ;

  __ummf_array_index($val, $x);
}


=head2 C<set_suboutput>

  $obj->set_suboutput(@val);

Sets the AssociationEnd C<suboutput> value.
Elements of C<@val> must of type L<UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin|UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin>.
Returns C<$obj>.

=cut
sub set_suboutput ($@)
{
  my ($self, @val) = @_;
  
  $self->clear_suboutput;
  $self->add_suboutput(@val);
}


=head2 C<set_index_suboutput>

  $obj->set_index_suboutput($i, $val);

Sets the value of AssociationEnd C<suboutput> at index C<$i>.
Returns self.

=cut
sub set_index_suboutput ($$$)
{
  my ($self, $i, $val) = @_;

  ;

  my $x = $self->{'suboutput'} ||= [ ];

  no warnings;
  my $old;
  if ( ($old = $x->[$i]) ne $val) {
    # Recursion lock
        $x->[$i] = $val
    ;

    # Remove and add associations with other ends.
        
    ;
  }

  $self;
}


=head2 C<add_suboutput>

  $obj->add_suboutput(@val);

Adds AssociationEnd C<suboutput> values.
Elements of C<@val> must of type L<UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin|UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin>.
Returns C<$obj>.

=cut
sub add_suboutput ($@)
{
  my ($self, @val) = @_;
  
    my $x = $self->{'suboutput'} ||= [ ];
    my $old; # Place holder for other MACRO.
  
  for my $val ( @val ) {
    # Recursion lock
        next if grep($_ eq $val, @$x);
        $self->__use('UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin')->__typecheck($val, "UMMF::UML::MetaModel::Behavioral_Elements::Actions::Collection_Actions::Reduce::ReduceAction.suboutput");

    # Recursion lock
        push(@{$x}, $val);
        
    # Remove and add associations with other ends.
          }
  
  $self;
}


=head2 C<add_index_suboutput>

  $obj->add_index_suboutput($i, @val);

Adds AssociationEnd C<suboutput> values at index C<$i>.
Elements of C<@val> must of type L<UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin|UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin>.
Returns C<$obj>.

=cut
sub add_index_suboutput ($$@)
{
  my ($self, $i, @val) = @_;

  
    my $x = $self->{'suboutput'} ||= [ ];
    my $old; # Place holder for other MACRO.
  
  for my $val ( @val ) {
    # Recursion lock
        next if grep($_ eq $val, @$x);
        $self->__use('UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin')->__typecheck($val, "UMMF::UML::MetaModel::Behavioral_Elements::Actions::Collection_Actions::Reduce::ReduceAction.suboutput");

    # Recursion lock
        splice(@{$x}, $i, 0, $val); # Recursion lock
        ++ $i;
    
    # Remove and add associations with other ends.
          }
  
  
  $self;
}


=head2 C<remove_suboutput>

  $obj->remove_suboutput(@val);

Removes the AssociationEnd C<suboutput> values C<@val>.
Elements of C<@val> must of type L<UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin|UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin>.
Returns C<$obj>.

=cut
sub remove_suboutput ($@)
{
  my ($self, @val) = @_;
  
    my $x = $self->{'suboutput'} ||= [ ];
  
  for my $old ( @val ) {
    # Recursion lock
        my $i; # index of $old in @$x.
    next unless defined($i = __ummf_array_index($x, $old));
    
    my $val = $old;
      
    $self->__use('UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin')->__typecheck($val, "UMMF::UML::MetaModel::Behavioral_Elements::Actions::Collection_Actions::Reduce::ReduceAction.suboutput");

    # Recursion lock
        splice(@$x, $i, 1);     
    $val = undef;

    # Remove associations with other ends.

        ;

  }
  
  $self;
}


=head2 C<clear_suboutput>

  $obj->clear_suboutput;

Clears the AssociationEnd C<suboutput> links to L<UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin|UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::OutputPin>.
Returns C<$obj>.

=cut
sub clear_suboutput ($) 
{
  my ($self) = @_;
  
    my $x = $self->{'suboutput'} ||= [ ];
  
  my $val; # Place holder for other MACRO.
  
    $self->{'suboutput'} = [ ];  # Recursion lock
  for my $old ( @$x ) { # Recursion lock
  
    # Remove associations with other ends.

        ;

  }
  
  $self;
}


=head2 C<count_suboutput>

  $obj->count_suboutput;

Returns the number of elements associated with C<suboutput>.

=cut
sub count_suboutput ($)
{
  my ($self) = @_;

  my $x = $self->{'suboutput'};

    defined $x ? scalar @$x : 0;
  }







# End of Class ReduceAction


=pod

=for html <hr/>

I<END OF DOCUMENT>

=cut

############################################################################

1; # is true!

############################################################################

### Keep these comments at end of file: kstephens@users.sourceforge.net 2003/04/06 ###
### Local Variables: ###
### mode:perl ###
### perl-indent-level:2 ###
### perl-continued-statement-offset:0 ###
### perl-brace-offset:0 ###
### perl-label-offset:0 ###
### End: ###

