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

#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::State_Machines::State -- 

=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::State_Machines::StateVertex|UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::StateVertex>




=head1 ATTRIBUTES

I<NO ATTRIBUTES>


=head1 ASSOCIATIONS


=head2 C<1..*> : C<inState> E<lt>---E<gt>  C<classifierInState> : UMMF::UML::MetaModel::Behavioral_Elements::Activity_Graphs::ClassifierInState 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::Activity_Graphs::ClassifierInState|UMMF::UML::MetaModel::Behavioral_Elements::Activity_Graphs::ClassifierInState>

=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<state> E<lt>---E<gt>  C<deferrableEvent> : UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Event 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::State_Machines::Event|UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Event>

=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..1> : C<state_Procedure> E<lt>---E<gt>  C<doActivity> : UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Procedure 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::Common_Behavior::Procedure|UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Procedure>

=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..1> : C<state_Procedure> E<lt>---E<gt>  C<entry> : UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Procedure 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::Common_Behavior::Procedure|UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Procedure>

=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..1> : C<state_Procedure> E<lt>---E<gt>  C<exit> : UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Procedure 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::Common_Behavior::Procedure|UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Procedure>

=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..1> : C<state> E<lt>---E<gt>  C<internalTransition> : UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Transition 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::State_Machines::Transition|UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Transition>

=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<top> E<lt>---E<gt>  C<stateMachine> : UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::StateMachine 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::State_Machines::StateMachine|UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::StateMachine>

=item multiplicity = C<0..1>

=item changeability = C<changeable>

=item targetScope = C<instance>

=item ordering = C<>

=item isNavigable = C<1>

=item aggregation = C<composite>

=item visibility = C<private>

=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::State_Machines::StateVertex



);


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

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





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


=head2 C<__validate_type>

  UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::State->__validate_type($value);

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

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

  no warnings;

  UNIVERSAL::isa($x, 'UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::State')  ;
}


=head2 C<__typecheck>

  UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::State->__typecheck($value, $msg);

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

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

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


=head2 C<isaState>


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

=cut
sub isaState { 1 }


=head2 C<isaBehavioral_Elements__State_Machines__State>


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

=cut
sub isaBehavioral_Elements__State_Machines__State { 1 }


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

=head2 C<__model_name> 

  my $name = $obj_or_package->__model_name;

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

=cut
sub __model_name { 'Behavioral_Elements::State_Machines::State' }



=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::State_Machines::State' =>
     {
       'table' => 'Behavioral_Elements__State_Machines__State',
       'abstract' => 0,
       'slots' => 
       { 
	 # Attributes
	 
	 # Associations
	 	 	       'classifierInState'
       => {
	 'type_impl' => 'set',
         'class' => 'UMMF::UML::MetaModel::Behavioral_Elements::Activity_Graphs::ClassifierInState',

                           'table' => 'Behavioral_Elements__ClassifierInState_InState', 

                                                      'item' => 'classifierInState', 

                  'coll' => 'inState',

                                                                               }
      ,
                  	 	       'deferrableEvent'
       => {
	 'type_impl' => 'set',
         'class' => 'UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Event',

                           'table' => 'Behavioral_Elements__State_Machines__State_DeferrableEvent', 

                                                      'item' => 'deferrableEvent', 

                  'coll' => 'state',

                                                                               }
      ,
                  	 	       'doActivity'
       => {
	 'type_impl' => 'ref',
         'class' => 'UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Procedure',

                  'null' => '1', 

                                    'col' => 'doActivity', 

                                                                                 'aggreg' => '1', 

                                           }
      ,
                  	 	       'entry'
       => {
	 'type_impl' => 'ref',
         'class' => 'UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Procedure',

                  'null' => '1', 

                                    'col' => 'entry', 

                                                                                 'aggreg' => '1', 

                                           }
      ,
                  	 	       'exit'
       => {
	 'type_impl' => 'ref',
         'class' => 'UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Procedure',

                  'null' => '1', 

                                    'col' => 'exit', 

                                                                                 'aggreg' => '1', 

                                           }
      ,
                  	 	       'internalTransition'
       => {
	 'type_impl' => 'iset',
         'class' => 'UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Transition',

                           'table' => 'Behavioral_Elements__State_Machines__State__internalTransition', 

                                                               'coll' => 'state',

                                             'aggreg' => '1', 

                                           }
      ,
                  	 	       'stateMachine'
       => {
	 'type_impl' => 'ref',
         'class' => 'UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::StateMachine',

                  'null' => '1', 

                                    'col' => 'stateMachine', 

                                                                                                                   }
      ,
                         },
       'bases' => [  'UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::StateVertex',  ],
       '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 
  #  inState 1..*
  #  <--> 
  #  classifierInState 0..* UMMF::UML::MetaModel::Behavioral_Elements::Activity_Graphs::ClassifierInState.
    if ( defined $self->{'classifierInState'} ) {
    my $x = $self->{'classifierInState'};
        $self->{'classifierInState'} = Set::Object->new();
        $self->set_classifierInState(@$x);
  }
  
  # AssociationEnd 
  #  state 0..*
  #  <--> 
  #  deferrableEvent 0..* UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Event.
    if ( defined $self->{'deferrableEvent'} ) {
    my $x = $self->{'deferrableEvent'};
        $self->{'deferrableEvent'} = Set::Object->new();
        $self->set_deferrableEvent(@$x);
  }
  
  # AssociationEnd 
  #  state_Procedure 0..1
  #  <--> 
  #  doActivity 0..1 UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Procedure.
    if ( defined $self->{'doActivity'} ) {
    my $x = $self->{'doActivity'};
    $self->{'doActivity'} = undef;
    $self->set_doActivity($x);
  }
  
  # AssociationEnd 
  #  state_Procedure 0..1
  #  <--> 
  #  entry 0..1 UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Procedure.
    if ( defined $self->{'entry'} ) {
    my $x = $self->{'entry'};
    $self->{'entry'} = undef;
    $self->set_entry($x);
  }
  
  # AssociationEnd 
  #  state_Procedure 0..1
  #  <--> 
  #  exit 0..1 UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Procedure.
    if ( defined $self->{'exit'} ) {
    my $x = $self->{'exit'};
    $self->{'exit'} = undef;
    $self->set_exit($x);
  }
  
  # AssociationEnd 
  #  state 0..1
  #  <--> 
  #  internalTransition 0..* UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Transition.
    if ( defined $self->{'internalTransition'} ) {
    my $x = $self->{'internalTransition'};
        $self->{'internalTransition'} = Set::Object->new();
        $self->set_internalTransition(@$x);
  }
  
  # AssociationEnd 
  #  top 1
  #  <--> 
  #  stateMachine 0..1 UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::StateMachine.
    if ( defined $self->{'stateMachine'} ) {
    my $x = $self->{'stateMachine'};
    $self->{'stateMachine'} = undef;
    $self->set_stateMachine($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::State_Machines::StateVertex');
  }

  $self->UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::State::___initialize;
  $self->UMMF::UML::MetaModel::Foundation::Core::Element::___initialize;
  $self->UMMF::UML::MetaModel::Foundation::Core::ModelElement::___initialize;
  $self->UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::StateVertex::___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::State_Machines::State::___create(@args);
  $self->UMMF::UML::MetaModel::Foundation::Core::Element::___create();
  $self->UMMF::UML::MetaModel::Foundation::Core::ModelElement::___create();
  $self->UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::StateVertex::___create();

  $self;
}




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




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


=for html <hr/>

=cut

#################################################################
# AssociationEnd inState <---> classifierInState
# type = UMMF::UML::MetaModel::Behavioral_Elements::Activity_Graphs::ClassifierInState
# multiplicity = 0..*
# ordering = 

=head2 C<classifierInState>

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

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

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

  # confess("Container for classifierInState $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_classifierInState>

  $obj->set_classifierInState(@val);

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

=cut
sub set_classifierInState ($@)
{
  my ($self, @val) = @_;
  
  $self->clear_classifierInState;
  $self->add_classifierInState(@val);
}


=head2 C<add_classifierInState>

  $obj->add_classifierInState(@val);

Adds AssociationEnd C<classifierInState> values.
Elements of C<@val> must of type L<UMMF::UML::MetaModel::Behavioral_Elements::Activity_Graphs::ClassifierInState|UMMF::UML::MetaModel::Behavioral_Elements::Activity_Graphs::ClassifierInState>.
Returns C<$obj>.

=cut
sub add_classifierInState ($@)
{
  my ($self, @val) = @_;
  
    my $x = $self->{'classifierInState'} ||= 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::Activity_Graphs::ClassifierInState')->__typecheck($val, "UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::State.classifierInState");

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

    }
  
  $self;
}


=head2 C<remove_classifierInState>

  $obj->remove_classifierInState(@val);

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

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

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

    # Remove associations with other ends.

        
    $old->remove_inState($self) if $old;
    $val->add_inState($self)    if $val;

  ;

  }
  
  $self;
}


=head2 C<clear_classifierInState>

  $obj->clear_classifierInState;

Clears the AssociationEnd C<classifierInState> links to L<UMMF::UML::MetaModel::Behavioral_Elements::Activity_Graphs::ClassifierInState|UMMF::UML::MetaModel::Behavioral_Elements::Activity_Graphs::ClassifierInState>.
Returns C<$obj>.

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

        
    $old->remove_inState($self) if $old;
    $val->add_inState($self)    if $val;

  ;

  }
  
  $self;
}


=head2 C<count_classifierInState>

  $obj->count_classifierInState;

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

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

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

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




=for html <hr/>

=cut

#################################################################
# AssociationEnd state <---> deferrableEvent
# type = UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Event
# multiplicity = 0..*
# ordering = 

=head2 C<deferrableEvent>

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

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

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

  # confess("Container for deferrableEvent $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_deferrableEvent>

  $obj->set_deferrableEvent(@val);

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

=cut
sub set_deferrableEvent ($@)
{
  my ($self, @val) = @_;
  
  $self->clear_deferrableEvent;
  $self->add_deferrableEvent(@val);
}


=head2 C<add_deferrableEvent>

  $obj->add_deferrableEvent(@val);

Adds AssociationEnd C<deferrableEvent> values.
Elements of C<@val> must of type L<UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Event|UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Event>.
Returns C<$obj>.

=cut
sub add_deferrableEvent ($@)
{
  my ($self, @val) = @_;
  
    my $x = $self->{'deferrableEvent'} ||= 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::State_Machines::Event')->__typecheck($val, "UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::State.deferrableEvent");

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

    }
  
  $self;
}


=head2 C<remove_deferrableEvent>

  $obj->remove_deferrableEvent(@val);

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

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

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

    # Remove associations with other ends.

        
    $old->remove_state($self) if $old;
    $val->add_state($self)    if $val;

  ;

  }
  
  $self;
}


=head2 C<clear_deferrableEvent>

  $obj->clear_deferrableEvent;

Clears the AssociationEnd C<deferrableEvent> links to L<UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Event|UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Event>.
Returns C<$obj>.

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

        
    $old->remove_state($self) if $old;
    $val->add_state($self)    if $val;

  ;

  }
  
  $self;
}


=head2 C<count_deferrableEvent>

  $obj->count_deferrableEvent;

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

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

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

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




=for html <hr/>

=cut

#################################################################
# AssociationEnd state_Procedure <---> doActivity
# type = UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Procedure
# multiplicity = 0..1
# ordering = 

=head2 C<doActivity>

  my $val = $obj->doActivity;

Returns the AssociationEnd C<doActivity> value of type L<UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Procedure|UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Procedure>.

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


=head2 C<set_doActivity>

  $obj->set_doActivity($val);

Sets the AssociationEnd C<doActivity> value.
C<$val> must of type L<UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Procedure|UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Procedure>.
Returns C<$obj>.

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

    if ( defined $val ) { $self->__use('UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Procedure')->__typecheck($val, "UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::State.doActivity") }

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

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

    }
		  
  $self;
}


=head2 C<add_doActivity>

  $obj->add_doActivity($val);

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

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

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

  my $old;
  if ( ($old = $self->{'doActivity'}) ne $val ) { # Recursion lock
    $self->__use('UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Procedure')->__typecheck($val, "UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::State.doActivity");
      
    # confess("UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::State::doActivity: too many")
    # if defined $self->{'doActivity'};

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

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

  
  }

  $self;
}


=head2 C<remove_doActivity>

  $obj->remove_doActivity($val);

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

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

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

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

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

  
  }
}


=head2 C<clear_doActivity>

  $obj->clear_doActivity;

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

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

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

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

    }

  $self;
}


=head2 C<count_doActivity>

  $obj->count_doActivity;

Returns the number of elements of type L<UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Procedure|UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Procedure> associated with C<doActivity>.

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

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

  defined $x ? 1 : 0;
}




=for html <hr/>

=cut

#################################################################
# AssociationEnd state_Procedure <---> entry
# type = UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Procedure
# multiplicity = 0..1
# ordering = 

=head2 C<entry>

  my $val = $obj->entry;

Returns the AssociationEnd C<entry> value of type L<UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Procedure|UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Procedure>.

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


=head2 C<set_entry>

  $obj->set_entry($val);

Sets the AssociationEnd C<entry> value.
C<$val> must of type L<UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Procedure|UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Procedure>.
Returns C<$obj>.

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

    if ( defined $val ) { $self->__use('UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Procedure')->__typecheck($val, "UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::State.entry") }

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

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

    }
		  
  $self;
}


=head2 C<add_entry>

  $obj->add_entry($val);

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

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

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

  my $old;
  if ( ($old = $self->{'entry'}) ne $val ) { # Recursion lock
    $self->__use('UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Procedure')->__typecheck($val, "UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::State.entry");
      
    # confess("UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::State::entry: too many")
    # if defined $self->{'entry'};

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

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

  
  }

  $self;
}


=head2 C<remove_entry>

  $obj->remove_entry($val);

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

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

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

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

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

  
  }
}


=head2 C<clear_entry>

  $obj->clear_entry;

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

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

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

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

    }

  $self;
}


=head2 C<count_entry>

  $obj->count_entry;

Returns the number of elements of type L<UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Procedure|UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Procedure> associated with C<entry>.

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

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

  defined $x ? 1 : 0;
}




=for html <hr/>

=cut

#################################################################
# AssociationEnd state_Procedure <---> exit
# type = UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Procedure
# multiplicity = 0..1
# ordering = 

=head2 C<exit>

  my $val = $obj->exit;

Returns the AssociationEnd C<exit> value of type L<UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Procedure|UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Procedure>.

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


=head2 C<set_exit>

  $obj->set_exit($val);

Sets the AssociationEnd C<exit> value.
C<$val> must of type L<UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Procedure|UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Procedure>.
Returns C<$obj>.

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

    if ( defined $val ) { $self->__use('UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Procedure')->__typecheck($val, "UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::State.exit") }

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

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

    }
		  
  $self;
}


=head2 C<add_exit>

  $obj->add_exit($val);

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

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

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

  my $old;
  if ( ($old = $self->{'exit'}) ne $val ) { # Recursion lock
    $self->__use('UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Procedure')->__typecheck($val, "UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::State.exit");
      
    # confess("UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::State::exit: too many")
    # if defined $self->{'exit'};

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

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

  
  }

  $self;
}


=head2 C<remove_exit>

  $obj->remove_exit($val);

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

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

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

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

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

  
  }
}


=head2 C<clear_exit>

  $obj->clear_exit;

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

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

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

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

    }

  $self;
}


=head2 C<count_exit>

  $obj->count_exit;

Returns the number of elements of type L<UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Procedure|UMMF::UML::MetaModel::Behavioral_Elements::Common_Behavior::Procedure> associated with C<exit>.

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

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

  defined $x ? 1 : 0;
}




=for html <hr/>

=cut

#################################################################
# AssociationEnd state <---> internalTransition
# type = UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Transition
# multiplicity = 0..*
# ordering = 

=head2 C<internalTransition>

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

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

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

  # confess("Container for internalTransition $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_internalTransition>

  $obj->set_internalTransition(@val);

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

=cut
sub set_internalTransition ($@)
{
  my ($self, @val) = @_;
  
  $self->clear_internalTransition;
  $self->add_internalTransition(@val);
}


=head2 C<add_internalTransition>

  $obj->add_internalTransition(@val);

Adds AssociationEnd C<internalTransition> values.
Elements of C<@val> must of type L<UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Transition|UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Transition>.
Returns C<$obj>.

=cut
sub add_internalTransition ($@)
{
  my ($self, @val) = @_;
  
    my $x = $self->{'internalTransition'} ||= 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::State_Machines::Transition')->__typecheck($val, "UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::State.internalTransition");

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

    }
  
  $self;
}


=head2 C<remove_internalTransition>

  $obj->remove_internalTransition(@val);

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

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

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

    # Remove associations with other ends.

        
    $old->remove_state($self) if $old;
    $val->add_state($self)    if $val;

  ;

  }
  
  $self;
}


=head2 C<clear_internalTransition>

  $obj->clear_internalTransition;

Clears the AssociationEnd C<internalTransition> links to L<UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Transition|UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::Transition>.
Returns C<$obj>.

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

        
    $old->remove_state($self) if $old;
    $val->add_state($self)    if $val;

  ;

  }
  
  $self;
}


=head2 C<count_internalTransition>

  $obj->count_internalTransition;

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

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

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

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




=for html <hr/>

=cut

#################################################################
# AssociationEnd top <---> stateMachine
# type = UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::StateMachine
# multiplicity = 0..1
# ordering = 

=head2 C<stateMachine>

  my $val = $obj->stateMachine;

Returns the AssociationEnd C<stateMachine> value of type L<UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::StateMachine|UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::StateMachine>.

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


=head2 C<set_stateMachine>

  $obj->set_stateMachine($val);

Sets the AssociationEnd C<stateMachine> value.
C<$val> must of type L<UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::StateMachine|UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::StateMachine>.
Returns C<$obj>.

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

    if ( defined $val ) { $self->__use('UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::StateMachine')->__typecheck($val, "UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::State.stateMachine") }

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

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

    }
		  
  $self;
}


=head2 C<add_stateMachine>

  $obj->add_stateMachine($val);

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

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

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

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

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

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

  
  }

  $self;
}


=head2 C<remove_stateMachine>

  $obj->remove_stateMachine($val);

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

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

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

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

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

  
  }
}


=head2 C<clear_stateMachine>

  $obj->clear_stateMachine;

Clears the AssociationEnd C<stateMachine> links to L<UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::StateMachine|UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::StateMachine>.
Returns C<$obj>.

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

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

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

    }

  $self;
}


=head2 C<count_stateMachine>

  $obj->count_stateMachine;

Returns the number of elements of type L<UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::StateMachine|UMMF::UML::MetaModel::Behavioral_Elements::State_Machines::StateMachine> associated with C<stateMachine>.

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

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

  defined $x ? 1 : 0;
}







# End of Class State


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

