/**
  * Computes the hash code for this object based on the id.
  *
  * @return The hash code for this object.
  */
 public final int hashCode() {
   if (hashCode == HASH_CODE_NOT_COMPUTED) {
     hashCode = HASH_INITIAL * HASH_FACTOR + Util.hashCode(classes);
     hashCode = hashCode * HASH_FACTOR + Util.hashCode(enablementExpression);
     hashCode = hashCode * HASH_FACTOR + Util.hashCode(mode);
     if (hashCode == HASH_CODE_NOT_COMPUTED) {
       hashCode++;
     }
   }
   return hashCode;
 }
Ejemplo n.º 2
0
  @Override
  public int hashCode() {
    if (hashCode == HASH_INITIAL) {
      hashCode = hashCode * HASH_FACTOR + Util.hashCode(categoryActivityBindings);
      hashCode = hashCode * HASH_FACTOR + Util.hashCode(defined);
      hashCode = hashCode * HASH_FACTOR + Util.hashCode(id);
      hashCode = hashCode * HASH_FACTOR + Util.hashCode(name);
      if (hashCode == HASH_INITIAL) {
        hashCode++;
      }
    }

    return hashCode;
  }