/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE @UMPLE_VERSION@ modeling language!*/



// line 1 "guardNameBothAttributeAndMethod3.ump"
public class A
{

  //------------------------
  // MEMBER VARIABLES
  //------------------------

  //A Attributes
  private boolean repeatCheck;

  //A State Machines
  public enum Status { s1, s2 }
  private Status status;

  //------------------------
  // CONSTRUCTOR
  //------------------------

  public A()
  {
    repeatCheck = false;
    setStatus(Status.s1);
  }

  //------------------------
  // INTERFACE
  //------------------------

  public boolean setRepeatCheck(boolean aRepeatCheck)
  {
    boolean wasSet = false;
    repeatCheck = aRepeatCheck;
    wasSet = true;
    return wasSet;
  }

  public boolean getRepeatCheck()
  {
    return repeatCheck;
  }

  public boolean isRepeatCheck()
  {
    return repeatCheck;
  }

  public String getStatusFullName()
  {
    String answer = status.toString();
    return answer;
  }

  public Status getStatus()
  {
    return status;
  }

  private boolean __autotransition1__()
  {
    boolean wasEventProcessed = false;
    
    Status aStatus = status;
    switch (aStatus)
    {
      case s1:
        if (getRepeatCheck()!=repeatCheck())
        {
          setStatus(Status.s2);
          wasEventProcessed = true;
          break;
        }
        break;
      default:
        // Other states do respond to this event
    }

    return wasEventProcessed;
  }

  private void setStatus(Status aStatus)
  {
    status = aStatus;

    // entry actions and do activities
    switch(status)
    {
      case s1:
        __autotransition1__();
        break;
    }
  }

  public void delete()
  {}

  // line 11 "guardNameBothAttributeAndMethod3.ump"
  public Boolean repeatCheck(){
    return true;
  }


  public String toString()
  {
    return super.toString() + "["+
            "repeatCheck" + ":" + getRepeatCheck()+ "]";
  }
}
