コード例 #1
0
ファイル: JimpleLocal.java プロジェクト: richardxx/soot
  /** Returns a hashCode consistent with object equality. */
  public int hashCode() {
    if (!isHashCodeChosen) {
      // Set the hash code for this object

      if (name != null & type != null) fixedHashCode = name.hashCode() + 19 * type.hashCode();
      else if (name != null) fixedHashCode = name.hashCode();
      else if (type != null) fixedHashCode = type.hashCode();
      else fixedHashCode = 1;

      isHashCodeChosen = true;
    }

    return fixedHashCode;
  }
コード例 #2
0
ファイル: MockRole.java プロジェクト: nazeersyed/openregistry
 @Override
 public int hashCode() {
   int result = id != null ? id.hashCode() : 0;
   result = 31 * result + (terminationReason != null ? terminationReason.hashCode() : 0);
   result = 31 * result + (sorRoleId != null ? sorRoleId.hashCode() : 0);
   result = 31 * result + (end != null ? end.hashCode() : 0);
   return result;
 }
コード例 #3
0
 public int hashCode() {
   int code = name.hashCode();
   for (Type arg : arg_types) code += arg.hashCode();
   return code;
 }
コード例 #4
0
ファイル: BafLocal.java プロジェクト: Bludge0n/AREsoft
 /** Returns a hash code for this object, consistent with structural equality. */
 public int equivHashCode() {
   return name.hashCode() * 101 + type.hashCode() * 17;
 }