# -*- 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::Collaborations::Message;

#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::Collaborations::Message -- 

=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::Action_Foundation::Action|UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::Action>




=head1 ATTRIBUTES

I<NO ATTRIBUTES>


=head1 ASSOCIATIONS


=head2 C<0..*> : C<message> E<lt>---E<gt>  C<communicationConnection> : UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::AssociationRole C<0..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::Collaborations::AssociationRole|UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::AssociationRole>

=item multiplicity = C<0..1>

=item changeability = C<changeable>

=item targetScope = C<instance>

=item ordering = C<>

=item isNavigable = C<1>

=item aggregation = C<none>

=item visibility = C<public>

=item container_type = C<Set::Object>

=back


=head2 C<0..*> : C<playedRole> E<lt>---E<gt>  C<conformingStimulus> : UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Stimulus C<0..*>



=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::Common_Behavior::Stimulus|UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Stimulus>

=item multiplicity = C<0..*>

=item changeability = C<changeable>

=item targetScope = C<instance>

=item ordering = C<>

=item isNavigable = C<1>

=item aggregation = C<none>

=item visibility = C<public>

=item container_type = C<Set::Object>

=back


=head2 C<1..*> : C<message> E<lt>---E<gt>  C<interaction> : UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Interaction 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::Collaborations::Interaction|UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Interaction>

=item multiplicity = C<1>

=item changeability = C<changeable>

=item targetScope = C<instance>

=item ordering = C<>

=item isNavigable = C<1>

=item aggregation = C<composite>

=item visibility = C<public>

=item container_type = C<Set::Object>

=back


=head2 C<0..*> : C<sucessor> E<lt>---E<gt>  C<predecessor> : UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Message C<0..*>



=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::Collaborations::Message|UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Message>

=item multiplicity = C<0..*>

=item changeability = C<changeable>

=item targetScope = C<instance>

=item ordering = C<>

=item isNavigable = C<1>

=item aggregation = C<none>

=item visibility = C<public>

=item container_type = C<Set::Object>

=back


=head2 C<0..*> : C<message_ClassifierRole> E<lt>---E<gt>  C<receiver> : UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::ClassifierRole 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::Collaborations::ClassifierRole|UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::ClassifierRole>

=item multiplicity = C<1>

=item changeability = C<changeable>

=item targetScope = C<instance>

=item ordering = C<>

=item isNavigable = C<1>

=item aggregation = C<none>

=item visibility = C<public>

=item container_type = C<Set::Object>

=back


=head2 C<0..*> : C<message_ClassifierRole> E<lt>---E<gt>  C<sender> : UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::ClassifierRole 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::Collaborations::ClassifierRole|UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::ClassifierRole>

=item multiplicity = C<1>

=item changeability = C<changeable>

=item targetScope = C<instance>

=item ordering = C<>

=item isNavigable = C<1>

=item aggregation = C<none>

=item visibility = C<public>

=item container_type = C<Set::Object>

=back


=head2 C<0..*> : C<predecessor> E<lt>---E<gt>  C<sucessor> : UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Message C<0..*>



=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::Collaborations::Message|UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Message>

=item multiplicity = C<0..*>

=item changeability = C<changeable>

=item targetScope = C<instance>

=item ordering = C<>

=item isNavigable = C<1>

=item aggregation = C<none>

=item visibility = C<public>

=item container_type = C<Set::Object>

=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::Action_Foundation::Action



);


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

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





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


=head2 C<__validate_type>

  UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Message->__validate_type($value);

Returns true if C<$value> is a valid representation of L<UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Message|UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Message>.

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

  no warnings;

  UNIVERSAL::isa($x, 'UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Message')  ;
}


=head2 C<__typecheck>

  UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Message->__typecheck($value, $msg);

Calls C<confess()> with C<$msg> if C<<UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Message->__validate_type($value)>> is false.

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

  confess("typecheck: $msg: type '" . 'UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Message' . ": value '$x'")
    unless __validate_type($self, $x);
}


=head2 C<isaMessage>


Returns true if receiver is a L<UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Message|UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Message>.
Other receivers will return false.

=cut
sub isaMessage { 1 }


=head2 C<isaBehavioral_Elements__Collaborations__Message>


Returns true if receiver is a L<UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Message|UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Message>.
Other receivers will return false.
This is the fully qualified version of the C<isaMessage> method.

=cut
sub isaBehavioral_Elements__Collaborations__Message { 1 }


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

=head2 C<__model_name> 

  my $name = $obj_or_package->__model_name;

Returns the UML Model name (C<'Behavioral_Elements::Collaborations::Message'>) for an object or package of
this Classifier.

=cut
sub __model_name { 'Behavioral_Elements::Collaborations::Message' }



=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::Collaborations::Message' =>
     {
       'table' => 'Behavioral_Elements__Collaborations__Message',
       'abstract' => 0,
       'slots' => 
       { 
	 # Attributes
	 
	 # Associations
	 	 	       'communicationConnection'
       => {
	 'type_impl' => 'ref',
         'class' => 'UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::AssociationRole',

                  'null' => '1', 

                                    'col' => 'communicationConnection', 

                                                                                                                   }
      ,
                  	 	       'conformingStimulus'
       => {
	 'type_impl' => 'set',
         'class' => 'UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Stimulus',

                           'table' => 'Behavioral_Elements__PlayedRole_ConformingStimulus', 

                                                      'item' => 'conformingStimulus', 

                  'coll' => 'playedRole',

                                                                               }
      ,
                  	 	       'interaction'
       => {
	 'type_impl' => 'ref',
         'class' => 'UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Interaction',

                                             'col' => 'interaction', 

                                                                                                                   }
      ,
                  	 	       'predecessor'
       => {
	 'type_impl' => 'set',
         'class' => 'UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Message',

                           'table' => 'Behavioral_Elements__Collaborations__Message__Predecessor_Sucessor', 

                                                      'item' => 'predecessor', 

                  'coll' => 'sucessor',

                                                                               }
      ,
                  	 	       'receiver'
       => {
	 'type_impl' => 'ref',
         'class' => 'UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::ClassifierRole',

                                             'col' => 'receiver', 

                                                                                                                   }
      ,
                  	 	       'sender'
       => {
	 'type_impl' => 'ref',
         'class' => 'UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::ClassifierRole',

                                             'col' => 'sender', 

                                                                                                                   }
      ,
                  	 	       'sucessor'
       => {
	 'type_impl' => 'set',
         'class' => 'UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Message',

                           'table' => 'Behavioral_Elements__Collaborations__Message__Predecessor_Sucessor', 

                                                      'item' => 'sucessor', 

                  'coll' => 'predecessor',

                                                                               }
      ,
                         },
       'bases' => [  'UMMF::UML::MetaModel::Behavioral_Elements::Actions::Action_Foundation::Action',  ],
       '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



  # Associations

  # AssociationEnd 
  #  message 0..*
  #  <--> 
  #  communicationConnection 0..1 UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::AssociationRole.
    if ( defined $self->{'communicationConnection'} ) {
    my $x = $self->{'communicationConnection'};
    $self->{'communicationConnection'} = undef;
    $self->set_communicationConnection($x);
  }
  
  # AssociationEnd 
  #  playedRole 0..*
  #  <--> 
  #  conformingStimulus 0..* UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Stimulus.
    if ( defined $self->{'conformingStimulus'} ) {
    my $x = $self->{'conformingStimulus'};
        $self->{'conformingStimulus'} = Set::Object->new();
        $self->set_conformingStimulus(@$x);
  }
  
  # AssociationEnd 
  #  message 1..*
  #  <--> 
  #  interaction 1 UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Interaction.
    if ( defined $self->{'interaction'} ) {
    my $x = $self->{'interaction'};
    $self->{'interaction'} = undef;
    $self->set_interaction($x);
  }
  
  # AssociationEnd 
  #  sucessor 0..*
  #  <--> 
  #  predecessor 0..* UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Message.
    if ( defined $self->{'predecessor'} ) {
    my $x = $self->{'predecessor'};
        $self->{'predecessor'} = Set::Object->new();
        $self->set_predecessor(@$x);
  }
  
  # AssociationEnd 
  #  message_ClassifierRole 0..*
  #  <--> 
  #  receiver 1 UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::ClassifierRole.
    if ( defined $self->{'receiver'} ) {
    my $x = $self->{'receiver'};
    $self->{'receiver'} = undef;
    $self->set_receiver($x);
  }
  
  # AssociationEnd 
  #  message_ClassifierRole 0..*
  #  <--> 
  #  sender 1 UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::ClassifierRole.
    if ( defined $self->{'sender'} ) {
    my $x = $self->{'sender'};
    $self->{'sender'} = undef;
    $self->set_sender($x);
  }
  
  # AssociationEnd 
  #  predecessor 0..*
  #  <--> 
  #  sucessor 0..* UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Message.
    if ( defined $self->{'sucessor'} ) {
    my $x = $self->{'sucessor'};
        $self->{'sucessor'} = Set::Object->new();
        $self->set_sucessor(@$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->UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Message::___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;
}
      

=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::Collaborations::Message::___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;
}




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




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


=for html <hr/>

=cut

#################################################################
# AssociationEnd message <---> communicationConnection
# type = UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::AssociationRole
# multiplicity = 0..1
# ordering = 

=head2 C<communicationConnection>

  my $val = $obj->communicationConnection;

Returns the AssociationEnd C<communicationConnection> value of type L<UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::AssociationRole|UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::AssociationRole>.

=cut
sub communicationConnection ($)
{
  my ($self) = @_;
		  
  $self->{'communicationConnection'};
}


=head2 C<set_communicationConnection>

  $obj->set_communicationConnection($val);

Sets the AssociationEnd C<communicationConnection> value.
C<$val> must of type L<UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::AssociationRole|UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::AssociationRole>.
Returns C<$obj>.

=cut
sub set_communicationConnection ($$)
{
  my ($self, $val) = @_;
		  
  no warnings; # Use of uninitialized value in string ne at ...
		  
  my $old;
  if ( ($old = $self->{'communicationConnection'}) ne $val ) { # Recursion lock

    if ( defined $val ) { $self->__use('UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::AssociationRole')->__typecheck($val, "UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Message.communicationConnection") }

    # Recursion lock
        $self->{'communicationConnection'} = $val
    ;

    # Remove and add associations with other ends.
        
    $old->remove_message($self) if $old;
    $val->add_message($self)    if $val;

    }
		  
  $self;
}


=head2 C<add_communicationConnection>

  $obj->add_communicationConnection($val);

Adds the AssociationEnd C<communicationConnection> value.
C<$val> must of type L<UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::AssociationRole|UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::AssociationRole>.
Throws exception if a value already exists.
Returns C<$obj>.

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

  no warnings; # Use of uninitialized value in string ne at ...

  my $old;
  if ( ($old = $self->{'communicationConnection'}) ne $val ) { # Recursion lock
    $self->__use('UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::AssociationRole')->__typecheck($val, "UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Message.communicationConnection");
      
    # confess("UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Message::communicationConnection: too many")
    # if defined $self->{'communicationConnection'};

    # Recursion lock
        $self->{'communicationConnection'} = $val
    ;

    # Remove and add associations with other ends.
        
    $old->remove_message($self) if $old;
    $val->add_message($self)    if $val;

  
  }

  $self;
}


=head2 C<remove_communicationConnection>

  $obj->remove_communicationConnection($val);

Removes the AssociationEnd C<communicationConnection> value C<$val>.
Returns C<$obj>.

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

  no warnings; # Use of uninitialized value in string ne at ...

  my $old;
  if ( ($old = $self->{'communicationConnection'}) eq $val ) { # Recursion lock
    $val = $self->{'communicationConnection'} = undef;         # Recursion lock

    # Remove and add associations with other ends.
        
    $old->remove_message($self) if $old;
    $val->add_message($self)    if $val;

  
  }
}


=head2 C<clear_communicationConnection>

  $obj->clear_communicationConnection;

Clears the AssociationEnd C<communicationConnection> links to L<UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::AssociationRole|UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::AssociationRole>.
Returns C<$obj>.

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

  my $old;
  if ( defined ($old = $self->{'communicationConnection'}) ) { # Recursion lock
    my $val = $self->{'communicationConnection'} = undef;      # Recursion lock

    # Remove and add associations with other ends.
        
    $old->remove_message($self) if $old;
    $val->add_message($self)    if $val;

    }

  $self;
}


=head2 C<count_communicationConnection>

  $obj->count_communicationConnection;

Returns the number of elements of type L<UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::AssociationRole|UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::AssociationRole> associated with C<communicationConnection>.

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

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

  defined $x ? 1 : 0;
}




=for html <hr/>

=cut

#################################################################
# AssociationEnd playedRole <---> conformingStimulus
# type = UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Stimulus
# multiplicity = 0..*
# ordering = 

=head2 C<conformingStimulus>

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

Returns the AssociationEnd C<conformingStimulus> values of type L<UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Stimulus|UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Stimulus>.
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 conformingStimulus ($)
{
  my ($self) = @_;

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

  # confess("Container for conformingStimulus $x is not a blessed ref: " . Data::Dumper->new([ $self ], [qw($self)])->Maxdepth(2)->Dump()) if $x && ref($x) !~ /::/;
 
  wantarray ? ($x ? $x->members() : ()) : [ $x ? $x->members() : () ];
  
}


=head2 C<set_conformingStimulus>

  $obj->set_conformingStimulus(@val);

Sets the AssociationEnd C<conformingStimulus> value.
Elements of C<@val> must of type L<UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Stimulus|UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Stimulus>.
Returns C<$obj>.

=cut
sub set_conformingStimulus ($@)
{
  my ($self, @val) = @_;
  
  $self->clear_conformingStimulus;
  $self->add_conformingStimulus(@val);
}


=head2 C<add_conformingStimulus>

  $obj->add_conformingStimulus(@val);

Adds AssociationEnd C<conformingStimulus> values.
Elements of C<@val> must of type L<UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Stimulus|UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Stimulus>.
Returns C<$obj>.

=cut
sub add_conformingStimulus ($@)
{
  my ($self, @val) = @_;
  
    my $x = $self->{'conformingStimulus'} ||= Set::Object->new();
    my $old; # Place holder for other MACRO.
  
  for my $val ( @val ) {
    # Recursion lock
        next if $x->includes($val);
        $self->__use('UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Stimulus')->__typecheck($val, "UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Message.conformingStimulus");

    # Recursion lock
        $x->insert($val);
    # weaken?
    
    # Remove and add associations with other ends.
        
    $old->remove_playedRole($self) if $old;
    $val->add_playedRole($self)    if $val;

    }
  
  $self;
}


=head2 C<remove_conformingStimulus>

  $obj->remove_conformingStimulus(@val);

Removes the AssociationEnd C<conformingStimulus> values C<@val>.
Elements of C<@val> must of type L<UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Stimulus|UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Stimulus>.
Returns C<$obj>.

=cut
sub remove_conformingStimulus ($@)
{
  my ($self, @val) = @_;
  
    my $x = $self->{'conformingStimulus'} ||= Set::Object->new();
  
  for my $old ( @val ) {
    # Recursion lock
        next unless $x->includes($old);
    
    my $val = $old;
      
    $self->__use('UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Stimulus')->__typecheck($val, "UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Message.conformingStimulus");

    # Recursion lock
        $x->remove($old);
    
    $val = undef;

    # Remove associations with other ends.

        
    $old->remove_playedRole($self) if $old;
    $val->add_playedRole($self)    if $val;

  ;

  }
  
  $self;
}


=head2 C<clear_conformingStimulus>

  $obj->clear_conformingStimulus;

Clears the AssociationEnd C<conformingStimulus> links to L<UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Stimulus|UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Stimulus>.
Returns C<$obj>.

=cut
sub clear_conformingStimulus ($) 
{
  my ($self) = @_;
  
    my $x = $self->{'conformingStimulus'} ||= Set::Object->new();
  
  my $val; # Place holder for other MACRO.
  
    $self->{'conformingStimulus'} = Set::Object->new(); # Recursion lock
  for my $old ( $x->members() ) {     # Recursion lock
  
    # Remove associations with other ends.

        
    $old->remove_playedRole($self) if $old;
    $val->add_playedRole($self)    if $val;

  ;

  }
  
  $self;
}


=head2 C<count_conformingStimulus>

  $obj->count_conformingStimulus;

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

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

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

    defined $x ? $x->size : 0;
  }




=for html <hr/>

=cut

#################################################################
# AssociationEnd message <---> interaction
# type = UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Interaction
# multiplicity = 1
# ordering = 

=head2 C<interaction>

  my $val = $obj->interaction;

Returns the AssociationEnd C<interaction> value of type L<UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Interaction|UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Interaction>.

=cut
sub interaction ($)
{
  my ($self) = @_;
		  
  $self->{'interaction'};
}


=head2 C<set_interaction>

  $obj->set_interaction($val);

Sets the AssociationEnd C<interaction> value.
C<$val> must of type L<UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Interaction|UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Interaction>.
Returns C<$obj>.

=cut
sub set_interaction ($$)
{
  my ($self, $val) = @_;
		  
  no warnings; # Use of uninitialized value in string ne at ...
		  
  my $old;
  if ( ($old = $self->{'interaction'}) ne $val ) { # Recursion lock

    if ( defined $val ) { $self->__use('UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Interaction')->__typecheck($val, "UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Message.interaction") }

    # Recursion lock
        $self->{'interaction'} = $val
    ;

    # Remove and add associations with other ends.
        
    $old->remove_message($self) if $old;
    $val->add_message($self)    if $val;

    }
		  
  $self;
}


=head2 C<add_interaction>

  $obj->add_interaction($val);

Adds the AssociationEnd C<interaction> value.
C<$val> must of type L<UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Interaction|UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Interaction>.
Throws exception if a value already exists.
Returns C<$obj>.

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

  no warnings; # Use of uninitialized value in string ne at ...

  my $old;
  if ( ($old = $self->{'interaction'}) ne $val ) { # Recursion lock
    $self->__use('UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Interaction')->__typecheck($val, "UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Message.interaction");
      
    # confess("UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Message::interaction: too many")
    # if defined $self->{'interaction'};

    # Recursion lock
        $self->{'interaction'} = $val
    ;

    # Remove and add associations with other ends.
        
    $old->remove_message($self) if $old;
    $val->add_message($self)    if $val;

  
  }

  $self;
}


=head2 C<remove_interaction>

  $obj->remove_interaction($val);

Removes the AssociationEnd C<interaction> value C<$val>.
Returns C<$obj>.

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

  no warnings; # Use of uninitialized value in string ne at ...

  my $old;
  if ( ($old = $self->{'interaction'}) eq $val ) { # Recursion lock
    $val = $self->{'interaction'} = undef;         # Recursion lock

    # Remove and add associations with other ends.
        
    $old->remove_message($self) if $old;
    $val->add_message($self)    if $val;

  
  }
}


=head2 C<clear_interaction>

  $obj->clear_interaction;

Clears the AssociationEnd C<interaction> links to L<UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Interaction|UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Interaction>.
Returns C<$obj>.

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

  my $old;
  if ( defined ($old = $self->{'interaction'}) ) { # Recursion lock
    my $val = $self->{'interaction'} = undef;      # Recursion lock

    # Remove and add associations with other ends.
        
    $old->remove_message($self) if $old;
    $val->add_message($self)    if $val;

    }

  $self;
}


=head2 C<count_interaction>

  $obj->count_interaction;

Returns the number of elements of type L<UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Interaction|UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Interaction> associated with C<interaction>.

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

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

  defined $x ? 1 : 0;
}




=for html <hr/>

=cut

#################################################################
# AssociationEnd sucessor <---> predecessor
# type = UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Message
# multiplicity = 0..*
# ordering = 

=head2 C<predecessor>

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

Returns the AssociationEnd C<predecessor> values of type L<UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Message|UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Message>.
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 predecessor ($)
{
  my ($self) = @_;

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

  # confess("Container for predecessor $x is not a blessed ref: " . Data::Dumper->new([ $self ], [qw($self)])->Maxdepth(2)->Dump()) if $x && ref($x) !~ /::/;
 
  wantarray ? ($x ? $x->members() : ()) : [ $x ? $x->members() : () ];
  
}


=head2 C<set_predecessor>

  $obj->set_predecessor(@val);

Sets the AssociationEnd C<predecessor> value.
Elements of C<@val> must of type L<UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Message|UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Message>.
Returns C<$obj>.

=cut
sub set_predecessor ($@)
{
  my ($self, @val) = @_;
  
  $self->clear_predecessor;
  $self->add_predecessor(@val);
}


=head2 C<add_predecessor>

  $obj->add_predecessor(@val);

Adds AssociationEnd C<predecessor> values.
Elements of C<@val> must of type L<UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Message|UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Message>.
Returns C<$obj>.

=cut
sub add_predecessor ($@)
{
  my ($self, @val) = @_;
  
    my $x = $self->{'predecessor'} ||= Set::Object->new();
    my $old; # Place holder for other MACRO.
  
  for my $val ( @val ) {
    # Recursion lock
        next if $x->includes($val);
        $self->__use('UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Message')->__typecheck($val, "UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Message.predecessor");

    # Recursion lock
        $x->insert($val);
    # weaken?
    
    # Remove and add associations with other ends.
        
    $old->remove_sucessor($self) if $old;
    $val->add_sucessor($self)    if $val;

    }
  
  $self;
}


=head2 C<remove_predecessor>

  $obj->remove_predecessor(@val);

Removes the AssociationEnd C<predecessor> values C<@val>.
Elements of C<@val> must of type L<UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Message|UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Message>.
Returns C<$obj>.

=cut
sub remove_predecessor ($@)
{
  my ($self, @val) = @_;
  
    my $x = $self->{'predecessor'} ||= Set::Object->new();
  
  for my $old ( @val ) {
    # Recursion lock
        next unless $x->includes($old);
    
    my $val = $old;
      
    $self->__use('UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Message')->__typecheck($val, "UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Message.predecessor");

    # Recursion lock
        $x->remove($old);
    
    $val = undef;

    # Remove associations with other ends.

        
    $old->remove_sucessor($self) if $old;
    $val->add_sucessor($self)    if $val;

  ;

  }
  
  $self;
}


=head2 C<clear_predecessor>

  $obj->clear_predecessor;

Clears the AssociationEnd C<predecessor> links to L<UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Message|UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Message>.
Returns C<$obj>.

=cut
sub clear_predecessor ($) 
{
  my ($self) = @_;
  
    my $x = $self->{'predecessor'} ||= Set::Object->new();
  
  my $val; # Place holder for other MACRO.
  
    $self->{'predecessor'} = Set::Object->new(); # Recursion lock
  for my $old ( $x->members() ) {     # Recursion lock
  
    # Remove associations with other ends.

        
    $old->remove_sucessor($self) if $old;
    $val->add_sucessor($self)    if $val;

  ;

  }
  
  $self;
}


=head2 C<count_predecessor>

  $obj->count_predecessor;

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

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

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

    defined $x ? $x->size : 0;
  }




=for html <hr/>

=cut

#################################################################
# AssociationEnd message_ClassifierRole <---> receiver
# type = UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::ClassifierRole
# multiplicity = 1
# ordering = 

=head2 C<receiver>

  my $val = $obj->receiver;

Returns the AssociationEnd C<receiver> value of type L<UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::ClassifierRole|UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::ClassifierRole>.

=cut
sub receiver ($)
{
  my ($self) = @_;
		  
  $self->{'receiver'};
}


=head2 C<set_receiver>

  $obj->set_receiver($val);

Sets the AssociationEnd C<receiver> value.
C<$val> must of type L<UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::ClassifierRole|UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::ClassifierRole>.
Returns C<$obj>.

=cut
sub set_receiver ($$)
{
  my ($self, $val) = @_;
		  
  no warnings; # Use of uninitialized value in string ne at ...
		  
  my $old;
  if ( ($old = $self->{'receiver'}) ne $val ) { # Recursion lock

    if ( defined $val ) { $self->__use('UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::ClassifierRole')->__typecheck($val, "UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Message.receiver") }

    # Recursion lock
        $self->{'receiver'} = $val
    ;

    # Remove and add associations with other ends.
        
    $old->remove_message_ClassifierRole($self) if $old;
    $val->add_message_ClassifierRole($self)    if $val;

    }
		  
  $self;
}


=head2 C<add_receiver>

  $obj->add_receiver($val);

Adds the AssociationEnd C<receiver> value.
C<$val> must of type L<UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::ClassifierRole|UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::ClassifierRole>.
Throws exception if a value already exists.
Returns C<$obj>.

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

  no warnings; # Use of uninitialized value in string ne at ...

  my $old;
  if ( ($old = $self->{'receiver'}) ne $val ) { # Recursion lock
    $self->__use('UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::ClassifierRole')->__typecheck($val, "UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Message.receiver");
      
    # confess("UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Message::receiver: too many")
    # if defined $self->{'receiver'};

    # Recursion lock
        $self->{'receiver'} = $val
    ;

    # Remove and add associations with other ends.
        
    $old->remove_message_ClassifierRole($self) if $old;
    $val->add_message_ClassifierRole($self)    if $val;

  
  }

  $self;
}


=head2 C<remove_receiver>

  $obj->remove_receiver($val);

Removes the AssociationEnd C<receiver> value C<$val>.
Returns C<$obj>.

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

  no warnings; # Use of uninitialized value in string ne at ...

  my $old;
  if ( ($old = $self->{'receiver'}) eq $val ) { # Recursion lock
    $val = $self->{'receiver'} = undef;         # Recursion lock

    # Remove and add associations with other ends.
        
    $old->remove_message_ClassifierRole($self) if $old;
    $val->add_message_ClassifierRole($self)    if $val;

  
  }
}


=head2 C<clear_receiver>

  $obj->clear_receiver;

Clears the AssociationEnd C<receiver> links to L<UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::ClassifierRole|UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::ClassifierRole>.
Returns C<$obj>.

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

  my $old;
  if ( defined ($old = $self->{'receiver'}) ) { # Recursion lock
    my $val = $self->{'receiver'} = undef;      # Recursion lock

    # Remove and add associations with other ends.
        
    $old->remove_message_ClassifierRole($self) if $old;
    $val->add_message_ClassifierRole($self)    if $val;

    }

  $self;
}


=head2 C<count_receiver>

  $obj->count_receiver;

Returns the number of elements of type L<UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::ClassifierRole|UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::ClassifierRole> associated with C<receiver>.

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

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

  defined $x ? 1 : 0;
}




=for html <hr/>

=cut

#################################################################
# AssociationEnd message_ClassifierRole <---> sender
# type = UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::ClassifierRole
# multiplicity = 1
# ordering = 

=head2 C<sender>

  my $val = $obj->sender;

Returns the AssociationEnd C<sender> value of type L<UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::ClassifierRole|UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::ClassifierRole>.

=cut
sub sender ($)
{
  my ($self) = @_;
		  
  $self->{'sender'};
}


=head2 C<set_sender>

  $obj->set_sender($val);

Sets the AssociationEnd C<sender> value.
C<$val> must of type L<UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::ClassifierRole|UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::ClassifierRole>.
Returns C<$obj>.

=cut
sub set_sender ($$)
{
  my ($self, $val) = @_;
		  
  no warnings; # Use of uninitialized value in string ne at ...
		  
  my $old;
  if ( ($old = $self->{'sender'}) ne $val ) { # Recursion lock

    if ( defined $val ) { $self->__use('UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::ClassifierRole')->__typecheck($val, "UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Message.sender") }

    # Recursion lock
        $self->{'sender'} = $val
    ;

    # Remove and add associations with other ends.
        
    $old->remove_message_ClassifierRole($self) if $old;
    $val->add_message_ClassifierRole($self)    if $val;

    }
		  
  $self;
}


=head2 C<add_sender>

  $obj->add_sender($val);

Adds the AssociationEnd C<sender> value.
C<$val> must of type L<UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::ClassifierRole|UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::ClassifierRole>.
Throws exception if a value already exists.
Returns C<$obj>.

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

  no warnings; # Use of uninitialized value in string ne at ...

  my $old;
  if ( ($old = $self->{'sender'}) ne $val ) { # Recursion lock
    $self->__use('UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::ClassifierRole')->__typecheck($val, "UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Message.sender");
      
    # confess("UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Message::sender: too many")
    # if defined $self->{'sender'};

    # Recursion lock
        $self->{'sender'} = $val
    ;

    # Remove and add associations with other ends.
        
    $old->remove_message_ClassifierRole($self) if $old;
    $val->add_message_ClassifierRole($self)    if $val;

  
  }

  $self;
}


=head2 C<remove_sender>

  $obj->remove_sender($val);

Removes the AssociationEnd C<sender> value C<$val>.
Returns C<$obj>.

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

  no warnings; # Use of uninitialized value in string ne at ...

  my $old;
  if ( ($old = $self->{'sender'}) eq $val ) { # Recursion lock
    $val = $self->{'sender'} = undef;         # Recursion lock

    # Remove and add associations with other ends.
        
    $old->remove_message_ClassifierRole($self) if $old;
    $val->add_message_ClassifierRole($self)    if $val;

  
  }
}


=head2 C<clear_sender>

  $obj->clear_sender;

Clears the AssociationEnd C<sender> links to L<UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::ClassifierRole|UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::ClassifierRole>.
Returns C<$obj>.

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

  my $old;
  if ( defined ($old = $self->{'sender'}) ) { # Recursion lock
    my $val = $self->{'sender'} = undef;      # Recursion lock

    # Remove and add associations with other ends.
        
    $old->remove_message_ClassifierRole($self) if $old;
    $val->add_message_ClassifierRole($self)    if $val;

    }

  $self;
}


=head2 C<count_sender>

  $obj->count_sender;

Returns the number of elements of type L<UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::ClassifierRole|UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::ClassifierRole> associated with C<sender>.

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

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

  defined $x ? 1 : 0;
}




=for html <hr/>

=cut

#################################################################
# AssociationEnd predecessor <---> sucessor
# type = UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Message
# multiplicity = 0..*
# ordering = 

=head2 C<sucessor>

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

Returns the AssociationEnd C<sucessor> values of type L<UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Message|UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Message>.
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 sucessor ($)
{
  my ($self) = @_;

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

  # confess("Container for sucessor $x is not a blessed ref: " . Data::Dumper->new([ $self ], [qw($self)])->Maxdepth(2)->Dump()) if $x && ref($x) !~ /::/;
 
  wantarray ? ($x ? $x->members() : ()) : [ $x ? $x->members() : () ];
  
}


=head2 C<set_sucessor>

  $obj->set_sucessor(@val);

Sets the AssociationEnd C<sucessor> value.
Elements of C<@val> must of type L<UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Message|UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Message>.
Returns C<$obj>.

=cut
sub set_sucessor ($@)
{
  my ($self, @val) = @_;
  
  $self->clear_sucessor;
  $self->add_sucessor(@val);
}


=head2 C<add_sucessor>

  $obj->add_sucessor(@val);

Adds AssociationEnd C<sucessor> values.
Elements of C<@val> must of type L<UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Message|UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Message>.
Returns C<$obj>.

=cut
sub add_sucessor ($@)
{
  my ($self, @val) = @_;
  
    my $x = $self->{'sucessor'} ||= Set::Object->new();
    my $old; # Place holder for other MACRO.
  
  for my $val ( @val ) {
    # Recursion lock
        next if $x->includes($val);
        $self->__use('UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Message')->__typecheck($val, "UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Message.sucessor");

    # Recursion lock
        $x->insert($val);
    # weaken?
    
    # Remove and add associations with other ends.
        
    $old->remove_predecessor($self) if $old;
    $val->add_predecessor($self)    if $val;

    }
  
  $self;
}


=head2 C<remove_sucessor>

  $obj->remove_sucessor(@val);

Removes the AssociationEnd C<sucessor> values C<@val>.
Elements of C<@val> must of type L<UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Message|UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Message>.
Returns C<$obj>.

=cut
sub remove_sucessor ($@)
{
  my ($self, @val) = @_;
  
    my $x = $self->{'sucessor'} ||= Set::Object->new();
  
  for my $old ( @val ) {
    # Recursion lock
        next unless $x->includes($old);
    
    my $val = $old;
      
    $self->__use('UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Message')->__typecheck($val, "UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Message.sucessor");

    # Recursion lock
        $x->remove($old);
    
    $val = undef;

    # Remove associations with other ends.

        
    $old->remove_predecessor($self) if $old;
    $val->add_predecessor($self)    if $val;

  ;

  }
  
  $self;
}


=head2 C<clear_sucessor>

  $obj->clear_sucessor;

Clears the AssociationEnd C<sucessor> links to L<UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Message|UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Message>.
Returns C<$obj>.

=cut
sub clear_sucessor ($) 
{
  my ($self) = @_;
  
    my $x = $self->{'sucessor'} ||= Set::Object->new();
  
  my $val; # Place holder for other MACRO.
  
    $self->{'sucessor'} = Set::Object->new(); # Recursion lock
  for my $old ( $x->members() ) {     # Recursion lock
  
    # Remove associations with other ends.

        
    $old->remove_predecessor($self) if $old;
    $val->add_predecessor($self)    if $val;

  ;

  }
  
  $self;
}


=head2 C<count_sucessor>

  $obj->count_sucessor;

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

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

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

    defined $x ? $x->size : 0;
  }







# End of Class Message


=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: ###

