GetHashCode() public method

public GetHashCode ( ) : int
return int
Example #1
0
 public override int GetHashCode()
 {
     if (hashCodeValue == 0)
     {
         OtpErlangObject.Hash hash = new OtpErlangObject.Hash(5);
         hash.combine(local.GetHashCode() + remote.GetHashCode());
         hashCodeValue = hash.valueOf();
     }
     return(hashCodeValue);
 }
Example #2
0
 protected override int doHashCode()
 {
     OtpErlangObject.Hash hash = new OtpErlangObject.Hash(1);
     hash.combine(pid.GetHashCode(), module.GetHashCode());
     hash.combine(arity);
     if (md5 != null)
     {
         hash.combine(md5);
     }
     hash.combine(index);
     hash.combine(uniq);
     if (freeVars != null)
     {
         foreach (OtpErlangObject o in freeVars)
         {
             hash.combine(o.GetHashCode(), 1);
         }
     }
     return(hash.valueOf());
 }