google-code-export / umple

Automatically exported from code.google.com/p/umple
1 stars 0 forks source link

Update Constraint equals to be based on the umple key #510

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago

Refactor into using the key

  public boolean equals(Object object)
  {
    if(object==null)
    {
      return false;
    }
    else
    {
      Constraint constraint = (Constraint)object;
      int size = constraint.numberOfExpressions();
      if(numberOfExpressions()!=size)
      {
        return false;
      }
      for(int i=0;i<size;i++)
      {
        if(!getExpression(i).equals(constraint.getExpression(i)))
        {
          return false;
        }
      }
    }
    return true;
  }

Original issue reported on code.google.com by aforw...@gmail.com on 9 Feb 2014 at 10:59

GoogleCodeExporter commented 9 years ago

Original comment by TimothyCLethbridge on 21 Mar 2014 at 6:36