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

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

=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::Foundation::Core::GeneralizableElement|UMMF::UML::MetaModel::Foundation::Core::GeneralizableElement>

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




=head1 ATTRIBUTES

I<NO ATTRIBUTES>


=head1 ASSOCIATIONS


=head2 C<0..1> : C<collaboration> E<lt>---E<gt>  C<collaborationInstanceSet_Collaboration> : UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::CollaborationInstanceSet 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::CollaborationInstanceSet|UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::CollaborationInstanceSet>

=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<private>

=item container_type = C<Set::Object>

=back


=head2 C<0..*> : C<usedCollaboration> E<lt>---E<gt>  C<collaboration_Collaboration> : UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Collaboration 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::Collaboration|UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Collaboration>

=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<private>

=item container_type = C<Set::Object>

=back


=head2 C<0..*> : C<collaboration_ModelElement> E<lt>---E<gt>  C<constrainingElement> : UMMF::UML::MetaModel::Foundation::Core::ModelElement 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::Foundation::Core::ModelElement|UMMF::UML::MetaModel::Foundation::Core::ModelElement>

=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<context> E<lt>---E<gt>  C<interaction> : UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Interaction 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::Interaction|UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Interaction>

=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<private>

=item container_type = C<Set::Object>

=back


=head2 C<0..*> : C<collaboration_Classifier> E<lt>---E<gt>  C<representedClassifier> : UMMF::UML::MetaModel::Foundation::Core::Classifier 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::Foundation::Core::Classifier|UMMF::UML::MetaModel::Foundation::Core::Classifier>

=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<collaboration_Operation> E<lt>---E<gt>  C<representedOperation> : UMMF::UML::MetaModel::Foundation::Core::Operation 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::Foundation::Core::Operation|UMMF::UML::MetaModel::Foundation::Core::Operation>

=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<collaboration_Collaboration> E<lt>---E<gt>  C<usedCollaboration> : UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Collaboration 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::Collaboration|UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Collaboration>

=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::Foundation::Core::GeneralizableElement  UMMF::UML::MetaModel::Foundation::Core::Namespace



);


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

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





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


=head2 C<__validate_type>

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

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

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

  no warnings;

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


=head2 C<__typecheck>

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

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

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

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


=head2 C<isaCollaboration>


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

=cut
sub isaCollaboration { 1 }


=head2 C<isaBehavioral_Elements__Collaborations__Collaboration>


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

=cut
sub isaBehavioral_Elements__Collaborations__Collaboration { 1 }


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

=head2 C<__model_name> 

  my $name = $obj_or_package->__model_name;

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

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



=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::Collaboration' =>
     {
       'table' => 'Behavioral_Elements__Collaborations__Collaboration',
       'abstract' => 0,
       'slots' => 
       { 
	 # Attributes
	 
	 # Associations
	 	 	       'collaborationInstanceSet_Collaboration'
       => {
	 'type_impl' => 'iset',
         'class' => 'UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::CollaborationInstanceSet',

                           'table' => 'Behavioral_Elements__Collaborations__Collaboration__collaborationInstanceSet_Collaboration', 

                                                               'coll' => 'collaboration',

                                                                               }
      ,
                  	 	       'collaboration_Collaboration'
       => {
	 'type_impl' => 'set',
         'class' => 'UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Collaboration',

                           'table' => 'Behavioral_Elements__Collaborations__Collaboration__Collaboration_UsedCollaboration', 

                                                      'item' => 'collaboration_Collaboration', 

                  'coll' => 'usedCollaboration',

                                                                               }
      ,
                  	 	       'constrainingElement'
       => {
	 'type_impl' => 'set',
         'class' => 'UMMF::UML::MetaModel::Foundation::Core::ModelElement',

                           'table' => 'Collaboration_ConstrainingElement', 

                                                      'item' => 'constrainingElement', 

                  'coll' => 'collaboration_ModelElement',

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

                           'table' => 'Behavioral_Elements__Collaborations__Collaboration__interaction', 

                                                               'coll' => 'context',

                                             'aggreg' => '1', 

                                           }
      ,
                  	 	       'representedClassifier'
       => {
	 'type_impl' => 'ref',
         'class' => 'UMMF::UML::MetaModel::Foundation::Core::Classifier',

                  'null' => '1', 

                                    'col' => 'representedClassifier', 

                                                                                                                   }
      ,
                  	 	       'representedOperation'
       => {
	 'type_impl' => 'ref',
         'class' => 'UMMF::UML::MetaModel::Foundation::Core::Operation',

                  'null' => '1', 

                                    'col' => 'representedOperation', 

                                                                                                                   }
      ,
                  	 	       'usedCollaboration'
       => {
	 'type_impl' => 'set',
         'class' => 'UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Collaboration',

                           'table' => 'Behavioral_Elements__Collaborations__Collaboration__Collaboration_UsedCollaboration', 

                                                      'item' => 'usedCollaboration', 

                  'coll' => 'collaboration_Collaboration',

                                                                               }
      ,
                         },
       'bases' => [  'UMMF::UML::MetaModel::Foundation::Core::GeneralizableElement',  'UMMF::UML::MetaModel::Foundation::Core::Namespace',  ],
       '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 
  #  collaboration 0..1
  #  <--> 
  #  collaborationInstanceSet_Collaboration 0..* UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::CollaborationInstanceSet.
    if ( defined $self->{'collaborationInstanceSet_Collaboration'} ) {
    my $x = $self->{'collaborationInstanceSet_Collaboration'};
        $self->{'collaborationInstanceSet_Collaboration'} = Set::Object->new();
        $self->set_collaborationInstanceSet_Collaboration(@$x);
  }
  
  # AssociationEnd 
  #  usedCollaboration 0..*
  #  <--> 
  #  collaboration_Collaboration 0..* UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Collaboration.
    if ( defined $self->{'collaboration_Collaboration'} ) {
    my $x = $self->{'collaboration_Collaboration'};
        $self->{'collaboration_Collaboration'} = Set::Object->new();
        $self->set_collaboration_Collaboration(@$x);
  }
  
  # AssociationEnd 
  #  collaboration_ModelElement 0..*
  #  <--> 
  #  constrainingElement 0..* UMMF::UML::MetaModel::Foundation::Core::ModelElement.
    if ( defined $self->{'constrainingElement'} ) {
    my $x = $self->{'constrainingElement'};
        $self->{'constrainingElement'} = Set::Object->new();
        $self->set_constrainingElement(@$x);
  }
  
  # AssociationEnd 
  #  context 1
  #  <--> 
  #  interaction 0..* UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Interaction.
    if ( defined $self->{'interaction'} ) {
    my $x = $self->{'interaction'};
        $self->{'interaction'} = Set::Object->new();
        $self->set_interaction(@$x);
  }
  
  # AssociationEnd 
  #  collaboration_Classifier 0..*
  #  <--> 
  #  representedClassifier 0..1 UMMF::UML::MetaModel::Foundation::Core::Classifier.
    if ( defined $self->{'representedClassifier'} ) {
    my $x = $self->{'representedClassifier'};
    $self->{'representedClassifier'} = undef;
    $self->set_representedClassifier($x);
  }
  
  # AssociationEnd 
  #  collaboration_Operation 0..*
  #  <--> 
  #  representedOperation 0..1 UMMF::UML::MetaModel::Foundation::Core::Operation.
    if ( defined $self->{'representedOperation'} ) {
    my $x = $self->{'representedOperation'};
    $self->{'representedOperation'} = undef;
    $self->set_representedOperation($x);
  }
  
  # AssociationEnd 
  #  collaboration_Collaboration 0..*
  #  <--> 
  #  usedCollaboration 0..* UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Collaboration.
    if ( defined $self->{'usedCollaboration'} ) {
    my $x = $self->{'usedCollaboration'};
        $self->{'usedCollaboration'} = Set::Object->new();
        $self->set_usedCollaboration(@$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::GeneralizableElement');
    $self->__use('UMMF::UML::MetaModel::Foundation::Core::Element');
    $self->__use('UMMF::UML::MetaModel::Foundation::Core::ModelElement');
    $self->__use('UMMF::UML::MetaModel::Foundation::Core::Namespace');
  }

  $self->UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Collaboration::___initialize;
  $self->UMMF::UML::MetaModel::Foundation::Core::GeneralizableElement::___initialize;
  $self->UMMF::UML::MetaModel::Foundation::Core::Element::___initialize;
  $self->UMMF::UML::MetaModel::Foundation::Core::ModelElement::___initialize;
  $self->UMMF::UML::MetaModel::Foundation::Core::Namespace::___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::Collaboration::___create(@args);
  $self->UMMF::UML::MetaModel::Foundation::Core::GeneralizableElement::___create();
  $self->UMMF::UML::MetaModel::Foundation::Core::Element::___create();
  $self->UMMF::UML::MetaModel::Foundation::Core::ModelElement::___create();
  $self->UMMF::UML::MetaModel::Foundation::Core::Namespace::___create();

  $self;
}




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




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


=for html <hr/>

=cut

#################################################################
# AssociationEnd collaboration <---> collaborationInstanceSet_Collaboration
# type = UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::CollaborationInstanceSet
# multiplicity = 0..*
# ordering = 

=head2 C<collaborationInstanceSet_Collaboration>

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

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

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

  # confess("Container for collaborationInstanceSet_Collaboration $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_collaborationInstanceSet_Collaboration>

  $obj->set_collaborationInstanceSet_Collaboration(@val);

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

=cut
sub set_collaborationInstanceSet_Collaboration ($@)
{
  my ($self, @val) = @_;
  
  $self->clear_collaborationInstanceSet_Collaboration;
  $self->add_collaborationInstanceSet_Collaboration(@val);
}


=head2 C<add_collaborationInstanceSet_Collaboration>

  $obj->add_collaborationInstanceSet_Collaboration(@val);

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

=cut
sub add_collaborationInstanceSet_Collaboration ($@)
{
  my ($self, @val) = @_;
  
    my $x = $self->{'collaborationInstanceSet_Collaboration'} ||= 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::CollaborationInstanceSet')->__typecheck($val, "UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Collaboration.collaborationInstanceSet_Collaboration");

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

    }
  
  $self;
}


=head2 C<remove_collaborationInstanceSet_Collaboration>

  $obj->remove_collaborationInstanceSet_Collaboration(@val);

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

=cut
sub remove_collaborationInstanceSet_Collaboration ($@)
{
  my ($self, @val) = @_;
  
    my $x = $self->{'collaborationInstanceSet_Collaboration'} ||= 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::CollaborationInstanceSet')->__typecheck($val, "UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Collaboration.collaborationInstanceSet_Collaboration");

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

    # Remove associations with other ends.

        
    $old->remove_collaboration($self) if $old;
    $val->add_collaboration($self)    if $val;

  ;

  }
  
  $self;
}


=head2 C<clear_collaborationInstanceSet_Collaboration>

  $obj->clear_collaborationInstanceSet_Collaboration;

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

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

        
    $old->remove_collaboration($self) if $old;
    $val->add_collaboration($self)    if $val;

  ;

  }
  
  $self;
}


=head2 C<count_collaborationInstanceSet_Collaboration>

  $obj->count_collaborationInstanceSet_Collaboration;

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

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

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

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




=for html <hr/>

=cut

#################################################################
# AssociationEnd usedCollaboration <---> collaboration_Collaboration
# type = UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Collaboration
# multiplicity = 0..*
# ordering = 

=head2 C<collaboration_Collaboration>

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

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

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

  # confess("Container for collaboration_Collaboration $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_collaboration_Collaboration>

  $obj->set_collaboration_Collaboration(@val);

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

=cut
sub set_collaboration_Collaboration ($@)
{
  my ($self, @val) = @_;
  
  $self->clear_collaboration_Collaboration;
  $self->add_collaboration_Collaboration(@val);
}


=head2 C<add_collaboration_Collaboration>

  $obj->add_collaboration_Collaboration(@val);

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

=cut
sub add_collaboration_Collaboration ($@)
{
  my ($self, @val) = @_;
  
    my $x = $self->{'collaboration_Collaboration'} ||= 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::Collaboration')->__typecheck($val, "UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Collaboration.collaboration_Collaboration");

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

    }
  
  $self;
}


=head2 C<remove_collaboration_Collaboration>

  $obj->remove_collaboration_Collaboration(@val);

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

=cut
sub remove_collaboration_Collaboration ($@)
{
  my ($self, @val) = @_;
  
    my $x = $self->{'collaboration_Collaboration'} ||= 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::Collaboration')->__typecheck($val, "UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Collaboration.collaboration_Collaboration");

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

    # Remove associations with other ends.

        
    $old->remove_usedCollaboration($self) if $old;
    $val->add_usedCollaboration($self)    if $val;

  ;

  }
  
  $self;
}


=head2 C<clear_collaboration_Collaboration>

  $obj->clear_collaboration_Collaboration;

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

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

        
    $old->remove_usedCollaboration($self) if $old;
    $val->add_usedCollaboration($self)    if $val;

  ;

  }
  
  $self;
}


=head2 C<count_collaboration_Collaboration>

  $obj->count_collaboration_Collaboration;

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

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

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

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




=for html <hr/>

=cut

#################################################################
# AssociationEnd collaboration_ModelElement <---> constrainingElement
# type = UMMF::UML::MetaModel::Foundation::Core::ModelElement
# multiplicity = 0..*
# ordering = 

=head2 C<constrainingElement>

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

Returns the AssociationEnd C<constrainingElement> values of type L<UMMF::UML::MetaModel::Foundation::Core::ModelElement|UMMF::UML::MetaModel::Foundation::Core::ModelElement>.
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 constrainingElement ($)
{
  my ($self) = @_;

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

  # confess("Container for constrainingElement $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_constrainingElement>

  $obj->set_constrainingElement(@val);

Sets the AssociationEnd C<constrainingElement> value.
Elements of C<@val> must of type L<UMMF::UML::MetaModel::Foundation::Core::ModelElement|UMMF::UML::MetaModel::Foundation::Core::ModelElement>.
Returns C<$obj>.

=cut
sub set_constrainingElement ($@)
{
  my ($self, @val) = @_;
  
  $self->clear_constrainingElement;
  $self->add_constrainingElement(@val);
}


=head2 C<add_constrainingElement>

  $obj->add_constrainingElement(@val);

Adds AssociationEnd C<constrainingElement> values.
Elements of C<@val> must of type L<UMMF::UML::MetaModel::Foundation::Core::ModelElement|UMMF::UML::MetaModel::Foundation::Core::ModelElement>.
Returns C<$obj>.

=cut
sub add_constrainingElement ($@)
{
  my ($self, @val) = @_;
  
    my $x = $self->{'constrainingElement'} ||= 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::Foundation::Core::ModelElement')->__typecheck($val, "UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Collaboration.constrainingElement");

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

    }
  
  $self;
}


=head2 C<remove_constrainingElement>

  $obj->remove_constrainingElement(@val);

Removes the AssociationEnd C<constrainingElement> values C<@val>.
Elements of C<@val> must of type L<UMMF::UML::MetaModel::Foundation::Core::ModelElement|UMMF::UML::MetaModel::Foundation::Core::ModelElement>.
Returns C<$obj>.

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

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

    # Remove associations with other ends.

        
    $old->remove_collaboration_ModelElement($self) if $old;
    $val->add_collaboration_ModelElement($self)    if $val;

  ;

  }
  
  $self;
}


=head2 C<clear_constrainingElement>

  $obj->clear_constrainingElement;

Clears the AssociationEnd C<constrainingElement> links to L<UMMF::UML::MetaModel::Foundation::Core::ModelElement|UMMF::UML::MetaModel::Foundation::Core::ModelElement>.
Returns C<$obj>.

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

        
    $old->remove_collaboration_ModelElement($self) if $old;
    $val->add_collaboration_ModelElement($self)    if $val;

  ;

  }
  
  $self;
}


=head2 C<count_constrainingElement>

  $obj->count_constrainingElement;

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

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

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

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




=for html <hr/>

=cut

#################################################################
# AssociationEnd context <---> interaction
# type = UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Interaction
# multiplicity = 0..*
# ordering = 

=head2 C<interaction>

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

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

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

  # confess("Container for interaction $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_interaction>

  $obj->set_interaction(@val);

Sets the AssociationEnd C<interaction> value.
Elements of 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) = @_;
  
  $self->clear_interaction;
  $self->add_interaction(@val);
}


=head2 C<add_interaction>

  $obj->add_interaction(@val);

Adds AssociationEnd C<interaction> values.
Elements of 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 add_interaction ($@)
{
  my ($self, @val) = @_;
  
    my $x = $self->{'interaction'} ||= 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::Interaction')->__typecheck($val, "UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Collaboration.interaction");

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

    }
  
  $self;
}


=head2 C<remove_interaction>

  $obj->remove_interaction(@val);

Removes the AssociationEnd C<interaction> values C<@val>.
Elements of 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 remove_interaction ($@)
{
  my ($self, @val) = @_;
  
    my $x = $self->{'interaction'} ||= 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::Interaction')->__typecheck($val, "UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Collaboration.interaction");

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

    # Remove associations with other ends.

        
    $old->remove_context($self) if $old;
    $val->add_context($self)    if $val;

  ;

  }
  
  $self;
}


=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 $x = $self->{'interaction'} ||= Set::Object->new();
  
  my $val; # Place holder for other MACRO.
  
    $self->{'interaction'} = Set::Object->new(); # Recursion lock
  for my $old ( $x->members() ) {     # Recursion lock
  
    # Remove associations with other ends.

        
    $old->remove_context($self) if $old;
    $val->add_context($self)    if $val;

  ;

  }
  
  $self;
}


=head2 C<count_interaction>

  $obj->count_interaction;

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

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

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

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




=for html <hr/>

=cut

#################################################################
# AssociationEnd collaboration_Classifier <---> representedClassifier
# type = UMMF::UML::MetaModel::Foundation::Core::Classifier
# multiplicity = 0..1
# ordering = 

=head2 C<representedClassifier>

  my $val = $obj->representedClassifier;

Returns the AssociationEnd C<representedClassifier> value of type L<UMMF::UML::MetaModel::Foundation::Core::Classifier|UMMF::UML::MetaModel::Foundation::Core::Classifier>.

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


=head2 C<set_representedClassifier>

  $obj->set_representedClassifier($val);

Sets the AssociationEnd C<representedClassifier> value.
C<$val> must of type L<UMMF::UML::MetaModel::Foundation::Core::Classifier|UMMF::UML::MetaModel::Foundation::Core::Classifier>.
Returns C<$obj>.

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

    if ( defined $val ) { $self->__use('UMMF::UML::MetaModel::Foundation::Core::Classifier')->__typecheck($val, "UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Collaboration.representedClassifier") }

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

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

    }
		  
  $self;
}


=head2 C<add_representedClassifier>

  $obj->add_representedClassifier($val);

Adds the AssociationEnd C<representedClassifier> value.
C<$val> must of type L<UMMF::UML::MetaModel::Foundation::Core::Classifier|UMMF::UML::MetaModel::Foundation::Core::Classifier>.
Throws exception if a value already exists.
Returns C<$obj>.

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

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

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

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

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

  
  }

  $self;
}


=head2 C<remove_representedClassifier>

  $obj->remove_representedClassifier($val);

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

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

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

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

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

  
  }
}


=head2 C<clear_representedClassifier>

  $obj->clear_representedClassifier;

Clears the AssociationEnd C<representedClassifier> links to L<UMMF::UML::MetaModel::Foundation::Core::Classifier|UMMF::UML::MetaModel::Foundation::Core::Classifier>.
Returns C<$obj>.

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

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

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

    }

  $self;
}


=head2 C<count_representedClassifier>

  $obj->count_representedClassifier;

Returns the number of elements of type L<UMMF::UML::MetaModel::Foundation::Core::Classifier|UMMF::UML::MetaModel::Foundation::Core::Classifier> associated with C<representedClassifier>.

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

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

  defined $x ? 1 : 0;
}




=for html <hr/>

=cut

#################################################################
# AssociationEnd collaboration_Operation <---> representedOperation
# type = UMMF::UML::MetaModel::Foundation::Core::Operation
# multiplicity = 0..1
# ordering = 

=head2 C<representedOperation>

  my $val = $obj->representedOperation;

Returns the AssociationEnd C<representedOperation> value of type L<UMMF::UML::MetaModel::Foundation::Core::Operation|UMMF::UML::MetaModel::Foundation::Core::Operation>.

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


=head2 C<set_representedOperation>

  $obj->set_representedOperation($val);

Sets the AssociationEnd C<representedOperation> value.
C<$val> must of type L<UMMF::UML::MetaModel::Foundation::Core::Operation|UMMF::UML::MetaModel::Foundation::Core::Operation>.
Returns C<$obj>.

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

    if ( defined $val ) { $self->__use('UMMF::UML::MetaModel::Foundation::Core::Operation')->__typecheck($val, "UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Collaboration.representedOperation") }

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

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

    }
		  
  $self;
}


=head2 C<add_representedOperation>

  $obj->add_representedOperation($val);

Adds the AssociationEnd C<representedOperation> value.
C<$val> must of type L<UMMF::UML::MetaModel::Foundation::Core::Operation|UMMF::UML::MetaModel::Foundation::Core::Operation>.
Throws exception if a value already exists.
Returns C<$obj>.

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

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

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

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

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

  
  }

  $self;
}


=head2 C<remove_representedOperation>

  $obj->remove_representedOperation($val);

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

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

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

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

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

  
  }
}


=head2 C<clear_representedOperation>

  $obj->clear_representedOperation;

Clears the AssociationEnd C<representedOperation> links to L<UMMF::UML::MetaModel::Foundation::Core::Operation|UMMF::UML::MetaModel::Foundation::Core::Operation>.
Returns C<$obj>.

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

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

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

    }

  $self;
}


=head2 C<count_representedOperation>

  $obj->count_representedOperation;

Returns the number of elements of type L<UMMF::UML::MetaModel::Foundation::Core::Operation|UMMF::UML::MetaModel::Foundation::Core::Operation> associated with C<representedOperation>.

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

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

  defined $x ? 1 : 0;
}




=for html <hr/>

=cut

#################################################################
# AssociationEnd collaboration_Collaboration <---> usedCollaboration
# type = UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Collaboration
# multiplicity = 0..*
# ordering = 

=head2 C<usedCollaboration>

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

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

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

  # confess("Container for usedCollaboration $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_usedCollaboration>

  $obj->set_usedCollaboration(@val);

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

=cut
sub set_usedCollaboration ($@)
{
  my ($self, @val) = @_;
  
  $self->clear_usedCollaboration;
  $self->add_usedCollaboration(@val);
}


=head2 C<add_usedCollaboration>

  $obj->add_usedCollaboration(@val);

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

=cut
sub add_usedCollaboration ($@)
{
  my ($self, @val) = @_;
  
    my $x = $self->{'usedCollaboration'} ||= 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::Collaboration')->__typecheck($val, "UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Collaboration.usedCollaboration");

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

    }
  
  $self;
}


=head2 C<remove_usedCollaboration>

  $obj->remove_usedCollaboration(@val);

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

=cut
sub remove_usedCollaboration ($@)
{
  my ($self, @val) = @_;
  
    my $x = $self->{'usedCollaboration'} ||= 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::Collaboration')->__typecheck($val, "UMMF::UML::MetaModel::Behavioral_Elements::Collaborations::Collaboration.usedCollaboration");

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

    # Remove associations with other ends.

        
    $old->remove_collaboration_Collaboration($self) if $old;
    $val->add_collaboration_Collaboration($self)    if $val;

  ;

  }
  
  $self;
}


=head2 C<clear_usedCollaboration>

  $obj->clear_usedCollaboration;

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

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

        
    $old->remove_collaboration_Collaboration($self) if $old;
    $val->add_collaboration_Collaboration($self)    if $val;

  ;

  }
  
  $self;
}


=head2 C<count_usedCollaboration>

  $obj->count_usedCollaboration;

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

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

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

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







# End of Class Collaboration


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

