java.util.Objects#equals ( )源码实例Demo

下面列出了java.util.Objects#equals ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

@Override
public boolean equals(java.lang.Object o) {
  if (this == o) {
    return true;
  }
  if (o == null || getClass() != o.getClass()) {
    return false;
  }
  RemoteProcessGroupPortDTO remoteProcessGroupPortDTO = (RemoteProcessGroupPortDTO) o;
  return Objects.equals(this.id, remoteProcessGroupPortDTO.id) &&
      Objects.equals(this.groupId, remoteProcessGroupPortDTO.groupId) &&
      Objects.equals(this.name, remoteProcessGroupPortDTO.name) &&
      Objects.equals(this.comments, remoteProcessGroupPortDTO.comments) &&
      Objects.equals(this.concurrentlySchedulableTaskCount, remoteProcessGroupPortDTO.concurrentlySchedulableTaskCount) &&
      Objects.equals(this.transmitting, remoteProcessGroupPortDTO.transmitting) &&
      Objects.equals(this.useCompression, remoteProcessGroupPortDTO.useCompression) &&
      Objects.equals(this.exists, remoteProcessGroupPortDTO.exists) &&
      Objects.equals(this.targetRunning, remoteProcessGroupPortDTO.targetRunning) &&
      Objects.equals(this.connected, remoteProcessGroupPortDTO.connected);
}
 
源代码2 项目: SB_Elsinore_Server   文件: Quantity.java
static private String getAbrvFromUnit(String t, String s){
	int i=0;	
	Converter[] u;

	if (Objects.equals(t, "vol"))
		u = volUnits;
	else if (Objects.equals(t, "pressure"))
		u = pressureUnits;
	else // assume weight
		u = weightUnits;

	while (i < u.length
			&& !u[i].unit.equalsIgnoreCase(s)) {
		i++;
	}
	if (i >= u.length)
		return null;
	else 
		return u[i].abrv;
}
 
源代码3 项目: ditto   文件: AbstractMessageCommandResponse.java
@SuppressWarnings({"squid:MethodCyclomaticComplexity", "squid:S1067"})
@Override
public boolean equals(@Nullable final Object obj) {
    if (this == obj) {
        return true;
    }
    if (obj == null || getClass() != obj.getClass()) {
        return false;
    }
    final AbstractMessageCommandResponse<?, ?> other = (AbstractMessageCommandResponse<?, ?>) obj;
    return other.canEqual(this) && Objects.equals(thingId, other.thingId)
            && Objects.equals(message, other.message)
            && super.equals(other);
}
 
源代码4 项目: atlas   文件: EntityMutations.java
@Override
public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;
    EntityMutations that = (EntityMutations) o;
    return Objects.equals(entityMutations, that.entityMutations);
}
 
源代码5 项目: presto   文件: SqlDecimal.java
@Override
public boolean equals(Object o)
{
    if (this == o) {
        return true;
    }
    if (o == null || getClass() != o.getClass()) {
        return false;
    }
    SqlDecimal that = (SqlDecimal) o;
    return Objects.equals(unscaledValue, that.unscaledValue);
}
 
源代码6 项目: ditto   文件: MongoQuery.java
@Override
public boolean equals(final Object o) {
    if (this == o) {
        return true;
    }
    if (o == null || getClass() != o.getClass()) {
        return false;
    }
    final MongoQuery that = (MongoQuery) o;
    return limit == that.limit &&
            skip == that.skip &&
            Objects.equals(criteria, that.criteria) &&
            Objects.equals(sortOptions, that.sortOptions);
}
 
@Override
public boolean equals(java.lang.Object o) {
  if (this == o) {
    return true;
  }
  if (o == null || getClass() != o.getClass()) {
    return false;
  }
  MixedPropertiesAndAdditionalPropertiesClass mixedPropertiesAndAdditionalPropertiesClass = (MixedPropertiesAndAdditionalPropertiesClass) o;
  return Objects.equals(this.uuid, mixedPropertiesAndAdditionalPropertiesClass.uuid) &&
      Objects.equals(this.dateTime, mixedPropertiesAndAdditionalPropertiesClass.dateTime) &&
      Objects.equals(this.map, mixedPropertiesAndAdditionalPropertiesClass.map);
}
 
源代码8 项目: huaweicloud-cs-sdk   文件: QueryClusterResponse.java
@Override
public boolean equals(java.lang.Object o) {
  if (this == o) {
    return true;
  }
  if (o == null || getClass() != o.getClass()) {
    return false;
  }
  QueryClusterResponse queryClusterResponse = (QueryClusterResponse) o;
  return Objects.equals(this.messageId, queryClusterResponse.messageId) &&
      Objects.equals(this.message, queryClusterResponse.message) &&
      Objects.equals(this.currentTime, queryClusterResponse.currentTime) &&
      Objects.equals(this.payload, queryClusterResponse.payload);
}
 
源代码9 项目: sdk   文件: GatewayMonitor.java
@Override
public boolean equals(java.lang.Object o) {
  if (this == o) {
    return true;
  }
  if (o == null || getClass() != o.getClass()) {
    return false;
  }
  GatewayMonitor gatewayMonitor = (GatewayMonitor) o;
  return Objects.equals(this.gatewayIp, gatewayMonitor.gatewayIp) &&
      Objects.equals(this.gatewayMonitorFailThreshold, gatewayMonitor.gatewayMonitorFailThreshold) &&
      Objects.equals(this.gatewayMonitorInterval, gatewayMonitor.gatewayMonitorInterval) &&
      Objects.equals(this.gatewayMonitorSuccessThreshold, gatewayMonitor.gatewayMonitorSuccessThreshold) &&
      Objects.equals(this.subnet, gatewayMonitor.subnet);
}
 
源代码10 项目: flow   文件: Dependency.java
@Override
public boolean equals(Object o) {
    if (this == o) {
        return true;
    }
    if (o == null || getClass() != o.getClass()) {
        return false;
    }
    Dependency that = (Dependency) o;
    return type == that.type && loadMode == that.loadMode
            && Objects.equals(url, that.url);

}
 
源代码11 项目: modernmt   文件: ScoreEntry.java
@Override
public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;
    ScoreEntry that = (ScoreEntry) o;
    return memory == that.memory &&
            Objects.equals(language, that.language) &&
            Arrays.equals(sentenceTokens, that.sentenceTokens) &&
            Arrays.equals(translationTokens, that.translationTokens);
}
 
源代码12 项目: java   文件: V1beta1SubjectRulesReviewStatus.java
@Override
public boolean equals(java.lang.Object o) {
  if (this == o) {
    return true;
  }
  if (o == null || getClass() != o.getClass()) {
    return false;
  }
  V1beta1SubjectRulesReviewStatus v1beta1SubjectRulesReviewStatus = (V1beta1SubjectRulesReviewStatus) o;
  return Objects.equals(this.evaluationError, v1beta1SubjectRulesReviewStatus.evaluationError) &&
      Objects.equals(this.incomplete, v1beta1SubjectRulesReviewStatus.incomplete) &&
      Objects.equals(this.nonResourceRules, v1beta1SubjectRulesReviewStatus.nonResourceRules) &&
      Objects.equals(this.resourceRules, v1beta1SubjectRulesReviewStatus.resourceRules);
}
 
源代码13 项目: cuba   文件: DesktopLabel.java
protected void fireChangeListeners(Object newValue) {
    Object oldValue = prevValue;
    prevValue = newValue;
    if (!Objects.equals(oldValue, newValue)) {
        fireValueChanged(oldValue, newValue);
    }
}
 
源代码14 项目: alexa-apis-for-java   文件: BadRequest.java
@Override
public boolean equals(java.lang.Object o) {
    if (this == o) {
        return true;
    }
    if (o == null || getClass() != o.getClass()) {
        return false;
    }
    BadRequest v1SkillInteractionModelTypeBadRequest = (BadRequest) o;
    return Objects.equals(this.errors, v1SkillInteractionModelTypeBadRequest.errors) &&
        Objects.equals(this.warnings, v1SkillInteractionModelTypeBadRequest.warnings);
}
 
源代码15 项目: datakernel   文件: DataItemString1.java
@Override
public boolean equals(Object o) {
	if (this == o) return true;
	if (o == null || getClass() != o.getClass()) return false;

	DataItemString1 that = (DataItemString1) o;

	if (key2 != that.key2) return false;
	if (metric1 != that.metric1) return false;
	if (metric2 != that.metric2) return false;
	return !(!Objects.equals(key1, that.key1));

}
 
源代码16 项目: tinkerpop   文件: Bytecode.java
@Override
public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;
    Binding<?> binding = (Binding<?>) o;
    return Objects.equals(key, binding.key) &&
            Objects.equals(value, binding.value);
}
 
@Override
public boolean equals(final Object o) {
	if (this == o) {
		return true;
	}
	if (o == null || getClass() != o.getClass()) {
		return false;
	}
	final SongPlayCountBean that = (SongPlayCountBean) o;
	return Objects.equals(artist, that.artist) &&
			Objects.equals(album, that.album) &&
			Objects.equals(name, that.name) &&
			Objects.equals(plays, that.plays);
}
 
源代码18 项目: cubeai   文件: Artifact.java
@Override
public boolean equals(Object o) {
    if (this == o) {
        return true;
    }
    if (o == null || getClass() != o.getClass()) {
        return false;
    }
    Artifact artifact = (Artifact) o;
    if (artifact.getId() == null || getId() == null) {
        return false;
    }
    return Objects.equals(getId(), artifact.getId());
}
 
源代码19 项目: lambda   文件: Either.java
@Override
public boolean equals(Object other) {
    return other instanceof Right && Objects.equals(r, ((Right) other).r);
}
 
源代码20 项目: Bytecoder   文件: XIncludeHandler.java
@Override
public boolean equals(Object obj) {
    return obj == this || obj instanceof UnparsedEntity
            && Objects.equals(name, ((UnparsedEntity)obj).name);
}