Пример #1
0
  /** 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
 @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
 /** Returns a hash code for this object, consistent with structural equality. */
 public int equivHashCode() {
   return name.hashCode() * 101 + type.hashCode() * 17;
 }