Beispiel #1
0
 @Nullable
 private static TypeWrapper wrap(Type type) {
   if (type == null) {
     return null;
   } else if (type instanceof Class) {
     return new ClassTypeWrapper((Class<?>) type);
   } else if (type instanceof ParameterizedType) {
     ParameterizedType parameterizedType = (ParameterizedType) type;
     return new ParameterizedTypeWrapper(
         toWrappers(parameterizedType.getActualTypeArguments()),
         (ClassTypeWrapper) wrap(parameterizedType.getRawType()),
         wrap(parameterizedType.getOwnerType()));
   } else if (type instanceof WildcardType) {
     WildcardType wildcardType = (WildcardType) type;
     return new WildcardTypeWrapper(
         toWrappers(wildcardType.getUpperBounds()),
         toWrappers(wildcardType.getLowerBounds()),
         type.hashCode());
   } else if (type instanceof TypeVariable) {
     TypeVariable<?> typeVariable = (TypeVariable<?>) type;
     return new TypeVariableTypeWrapper(
         typeVariable.getName(), toWrappers(typeVariable.getBounds()), type.hashCode());
   } else if (type instanceof GenericArrayType) {
     GenericArrayType genericArrayType = (GenericArrayType) type;
     return new GenericArrayTypeWrapper(
         wrap(genericArrayType.getGenericComponentType()), type.hashCode());
   } else {
     throw new IllegalArgumentException("cannot wrap type of type " + type.getClass());
   }
 }
Beispiel #2
0
 @Override
 public int hashCode() {
   int result = super.hashCode();
   result = 31 * result + base.hashCode();
   result = 31 * result + arg.hashCode();
   return result;
 }
Beispiel #3
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;
  }
 @Override
 public int hashCode() {
   int hashCode = 17;
   hashCode = 31 * hashCode + clazzes.hashCode();
   hashCode = 31 * hashCode + type.hashCode();
   return hashCode;
 }
 @Override
 public int hashCode() {
   int result = type != null ? type.hashCode() : 0;
   result = 31 * result + (singularText != null ? singularText.hashCode() : 0);
   result = 31 * result + (pluralText != null ? pluralText.hashCode() : 0);
   return result;
 }
Beispiel #6
0
 @Override
 public int hashCode() {
   int result;
   result = (name != null ? name.hashCode() : 0);
   result = 31 * result + (type != null ? type.hashCode() : 0);
   return result;
 }
 @Override
 public int hashCode() {
   int result = type.hashCode();
   result = 31 * result + (coefficient != null ? coefficient.hashCode() : 0);
   result = 31 * result + (offset != null ? offset.hashCode() : 0);
   return result;
 }
Beispiel #8
0
 @Override
 public int hashCode() {
   final int prime = 31;
   int result = 1;
   result = prime * result + ((base == null) ? 0 : base.hashCode());
   result = prime * result + size;
   return result;
 }
Beispiel #9
0
 /*
  * (non-Javadoc)
  *
  * @see java.lang.Object#hashCode()
  */
 @Override
 public int hashCode() {
   final int prime = 31;
   int result = 1;
   result = prime * result + ((annotatedPart == null) ? 0 : annotatedPart.hashCode());
   result = prime * result + ((type == null) ? 0 : type.hashCode());
   return result;
 }
 @Override
 public int hashCode() {
   final int prime = 31;
   int result = 1;
   result = prime * result + ((parameterType == null) ? 0 : parameterType.hashCode());
   result = prime * result + ((type == null) ? 0 : type.getName().hashCode());
   return result;
 }
Beispiel #11
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;
 }
Beispiel #12
0
 @Override
 public int hashCode() {
   final int prime = 31;
   int result = 1;
   result = prime * result + ((name == null) ? 0 : name.hashCode());
   result = prime * result + ((type == null) ? 0 : type.hashCode());
   return result;
 }
 @Override
 public int hashCode() {
   int result = uuid != null ? uuid.hashCode() : 0;
   result = 31 * result + (type != null ? type.hashCode() : 0);
   result = 31 * result + (name != null ? name.hashCode() : 0);
   result = 31 * result + (ip != null ? ip.hashCode() : 0);
   result = 31 * result + (mac != null ? mac.hashCode() : 0);
   result = 31 * result + (category != null ? category.hashCode() : 0);
   return result;
 }
 @Override
 public int hashCode() {
   final int prime = 31;
   int result = 1;
   result = prime * result + ((createdDate == null) ? 0 : createdDate.hashCode());
   result = prime * result + ((id == null) ? 0 : id.hashCode());
   result = prime * result + ((type == null) ? 0 : type.hashCode());
   result = prime * result + ((user == null) ? 0 : user.hashCode());
   result = prime * result + ((value == null) ? 0 : value.hashCode());
   return result;
 }
Beispiel #15
0
 @Override
 public int hashCode() {
   int result = (int) (versionCreated ^ (versionCreated >>> 32));
   result = 31 * result + (int) (versionUpdated ^ (versionUpdated >>> 32));
   result = 31 * result + (type != null ? type.hashCode() : 0);
   result = 31 * result + (updatedFields != null ? updatedFields.hashCode() : 0);
   result = 31 * result + (recordTypeChanged ? 1 : 0);
   result = 31 * result + (vtagsToIndex != null ? vtagsToIndex.hashCode() : 0);
   result = 31 * result + (attributes != null ? attributes.hashCode() : 0);
   return result;
 }
 @Override
 public int hashCode() {
   int h = 1;
   h *= 1000003;
   h ^= key.hashCode();
   h *= 1000003;
   h ^= Arrays.hashCode(value);
   h *= 1000003;
   h ^= type.hashCode();
   h *= 1000003;
   h ^= (endpoint == null) ? 0 : endpoint.hashCode();
   return h;
 }
 @Override
 public int hashCode() {
   final int prime = 31;
   int result = 1;
   result = prime * result + ((address == null) ? 0 : address.hashCode());
   result = prime * result + ((broadcastAddress == null) ? 0 : broadcastAddress.hashCode());
   result = prime * result + ((friendlyName == null) ? 0 : friendlyName.hashCode());
   result = prime * result + ((gatewayAddress == null) ? 0 : gatewayAddress.hashCode());
   result = prime * result + ((href == null) ? 0 : href.hashCode());
   result = prime * result + ((id == null) ? 0 : id.hashCode());
   result = prime * result + ((name == null) ? 0 : name.hashCode());
   result = prime * result + ((networkType == null) ? 0 : networkType.hashCode());
   result = prime * result + ((rnatAddress == null) ? 0 : rnatAddress.hashCode());
   result = prime * result + ((vlan == null) ? 0 : vlan.hashCode());
   return result;
 }
 @Override
 public int hashCode() {
   int result = (pre ? 1 : 0);
   result = 31 * result + (cache != null ? cache.hashCode() : 0);
   result = 31 * result + (key != null ? key.hashCode() : 0);
   result = 31 * result + (transaction != null ? transaction.hashCode() : 0);
   result = 31 * result + (originLocal ? 1 : 0);
   result = 31 * result + (transactionSuccessful ? 1 : 0);
   result = 31 * result + (type != null ? type.hashCode() : 0);
   result = 31 * result + (value != null ? value.hashCode() : 0);
   result = 31 * result + (membersAtStart != null ? membersAtStart.hashCode() : 0);
   result = 31 * result + (membersAtEnd != null ? membersAtEnd.hashCode() : 0);
   result = 31 * result + (consistentHashAtStart != null ? consistentHashAtStart.hashCode() : 0);
   result = 31 * result + (consistentHashAtEnd != null ? consistentHashAtEnd.hashCode() : 0);
   result = 31 * result + ((int) newViewId);
   return result;
 }
 @Override
 public int hashCode() {
   int result = (pre ? 1 : 0);
   result = 31 * result + (cache != null ? cache.hashCode() : 0);
   result = 31 * result + (key != null ? key.hashCode() : 0);
   result = 31 * result + (transaction != null ? transaction.hashCode() : 0);
   result = 31 * result + (originLocal ? 1 : 0);
   result = 31 * result + (transactionSuccessful ? 1 : 0);
   result = 31 * result + (type != null ? type.hashCode() : 0);
   result = 31 * result + (value != null ? value.hashCode() : 0);
   result = 31 * result + (consistentHashAtStart != null ? consistentHashAtStart.hashCode() : 0);
   result = 31 * result + (consistentHashAtEnd != null ? consistentHashAtEnd.hashCode() : 0);
   result = 31 * result + (unionConsistentHash != null ? unionConsistentHash.hashCode() : 0);
   result = 31 * result + newTopologyId;
   result = 31 * result + (created ? 1 : 0);
   result = 31 * result + (oldValue != null ? oldValue.hashCode() : 0);
   return result;
 }
Beispiel #20
0
 @Override
 public int hashCode() {
   int result = super.hashCode;
   if (result == 0) {
     result = unknownFields().hashCode();
     result = result * 37 + (name != null ? name.hashCode() : 0);
     result = result * 37 + (doc != null ? doc.hashCode() : 0);
     result = result * 37 + (number != null ? number.hashCode() : 0);
     result = result * 37 + (label != null ? label.hashCode() : 0);
     result = result * 37 + (type != null ? type.hashCode() : 0);
     result = result * 37 + (type_name != null ? type_name.hashCode() : 0);
     result = result * 37 + (extendee != null ? extendee.hashCode() : 0);
     result = result * 37 + (default_value != null ? default_value.hashCode() : 0);
     result = result * 37 + (options != null ? options.hashCode() : 0);
     super.hashCode = result;
   }
   return result;
 }
Beispiel #21
0
 @Override
 public int hashCode() {
   return 53 * 5 + (int) (this.offset ^ (this.offset >>> 32)) + 37 * type.hashCode();
 }
 @Override
 public int hashCode() {
   int result = type.hashCode();
   result = 31 * result + accession.hashCode();
   return result;
 }
Beispiel #23
0
 public int hashCode() {
   int code = name.hashCode();
   for (Type arg : arg_types) code += arg.hashCode();
   return code;
 }
Beispiel #24
0
 @Override
 public int hashCode() {
   return 56509 + 3511 * fKeyType.hashCode() + 1171 * fValueType.hashCode();
 }
Beispiel #25
0
 @Override
 public int hashCode() {
   return type.hashCode();
 }
Beispiel #26
0
 /** Returns a hash code for this object, consistent with structural equality. */
 public int equivHashCode() {
   return name.hashCode() * 101 + type.hashCode() * 17;
 }
 @Override
 public int hashCode() {
   int result = type.hashCode();
   result = 31 * result + message.hashCode();
   return result;
 }
Beispiel #28
0
 @Override
 public int hashCode() {
   return Util.combineHashesOrdered(m_argumentTypes.hashCode(), m_returnType.hashCode());
 }
Beispiel #29
0
 public int hashCode() {
   return position.hashCode() + type.hashCode() + time;
 }
Beispiel #30
0
 @Override
 public int hashCode() {
   return type.hashCode() + (value != null ? value.hashCode() : 0);
 }