Github user jacobwil commented on a diff in the pull request:

    https://github.com/apache/incubator-pirk/pull/115#discussion_r85745699
  
    --- Diff: src/main/java/org/apache/pirk/encryption/Paillier.java ---
    @@ -340,4 +342,41 @@ private String parametersToString()
         return "p = " + p.intValue() + " q = " + q.intValue() + " N = " + 
N.intValue() + " NSquared = " + NSquared.intValue() + " lambdaN = " + 
lambdaN.intValue()
             + " bitLength = " + bitLength;
       }
    +
    +  @Override public boolean equals(Object o)
    +  {
    +    if (this == o)
    +      return true;
    +    if (o == null || getClass() != o.getClass())
    +      return false;
    +
    +    Paillier paillier = (Paillier) o;
    +
    +    if (bitLength != paillier.bitLength)
    +      return false;
    +    if (!p.equals(paillier.p))
    +      return false;
    +    if (!q.equals(paillier.q))
    +      return false;
    +    if (!N.equals(paillier.N))
    +      return false;
    +    if (!NSquared.equals(paillier.NSquared))
    +      return false;
    +    if (!lambdaN.equals(paillier.lambdaN))
    +      return false;
    --- End diff --
    
    Personally I prefer the separate if statements when there are this many 
entries because it's easier to skim through. Putting all of those statements on 
one line makes it easy to visually glide past one of them. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to