本文整理了Java中com.google.protobuf.Any.equals()
方法的一些代码示例,展示了Any.equals()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Any.equals()
方法的具体详情如下:
包路径:com.google.protobuf.Any
类名称:Any
方法名:equals
暂无
代码示例来源:origin: com.google.protobuf/protobuf-java
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.protobuf.Option)) {
return super.equals(obj);
}
com.google.protobuf.Option other = (com.google.protobuf.Option) obj;
boolean result = true;
result = result && getName()
.equals(other.getName());
result = result && (hasValue() == other.hasValue());
if (hasValue()) {
result = result && getValue()
.equals(other.getValue());
}
result = result && unknownFields.equals(other.unknownFields);
return result;
}
代码示例来源:origin: googleapis/google-cloud-java
switch (payloadCase_) {
case 2:
result = result && getProtoPayload().equals(other.getProtoPayload());
break;
case 3:
代码示例来源:origin: envoyproxy/java-control-plane
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof io.envoyproxy.envoy.api.v2.Discovery.Resource)) {
return super.equals(obj);
}
io.envoyproxy.envoy.api.v2.Discovery.Resource other = (io.envoyproxy.envoy.api.v2.Discovery.Resource) obj;
boolean result = true;
result = result && getVersion()
.equals(other.getVersion());
result = result && (hasResource() == other.hasResource());
if (hasResource()) {
result = result && getResource()
.equals(other.getResource());
}
result = result && unknownFields.equals(other.unknownFields);
return result;
}
代码示例来源:origin: cisco-ie/anx
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.cisco.stbarth.netconf.grpc.GNMI.Error)) {
return super.equals(obj);
}
com.cisco.stbarth.netconf.grpc.GNMI.Error other = (com.cisco.stbarth.netconf.grpc.GNMI.Error) obj;
boolean result = true;
result = result && (getCode()
== other.getCode());
result = result && getMessage()
.equals(other.getMessage());
result = result && (hasData() == other.hasData());
if (hasData()) {
result = result && getData()
.equals(other.getData());
}
result = result && unknownFields.equals(other.unknownFields);
return result;
}
代码示例来源:origin: envoyproxy/java-control-plane
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof io.envoyproxy.envoy.config.filter.network.thrift_proxy.v2alpha1.ThriftProxyOuterClass.ThriftFilter)) {
return super.equals(obj);
}
io.envoyproxy.envoy.config.filter.network.thrift_proxy.v2alpha1.ThriftProxyOuterClass.ThriftFilter other = (io.envoyproxy.envoy.config.filter.network.thrift_proxy.v2alpha1.ThriftProxyOuterClass.ThriftFilter) obj;
boolean result = true;
result = result && getName()
.equals(other.getName());
result = result && getConfigTypeCase().equals(
other.getConfigTypeCase());
if (!result) return false;
switch (configTypeCase_) {
case 2:
result = result && getConfig()
.equals(other.getConfig());
break;
case 3:
result = result && getTypedConfig()
.equals(other.getTypedConfig());
break;
case 0:
default:
}
result = result && unknownFields.equals(other.unknownFields);
return result;
}
代码示例来源:origin: chenjunwen/SpringBootFrame
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof Demo.Request)) {
return super.equals(obj);
}
Demo.Request other = (Demo.Request) obj;
boolean result = true;
result = result && command_ == other.command_;
result = result && (getSequenceId()
== other.getSequenceId());
result = result && getSessionId()
.equals(other.getSessionId());
result = result && (hasBody() == other.hasBody());
if (hasBody()) {
result = result && getBody()
.equals(other.getBody());
}
return result;
}
代码示例来源:origin: envoyproxy/java-control-plane
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof io.envoyproxy.envoy.api.v2.listener.Listener.Filter)) {
return super.equals(obj);
}
io.envoyproxy.envoy.api.v2.listener.Listener.Filter other = (io.envoyproxy.envoy.api.v2.listener.Listener.Filter) obj;
boolean result = true;
result = result && getName()
.equals(other.getName());
result = result && getConfigTypeCase().equals(
other.getConfigTypeCase());
if (!result) return false;
switch (configTypeCase_) {
case 2:
result = result && getConfig()
.equals(other.getConfig());
break;
case 4:
result = result && getTypedConfig()
.equals(other.getTypedConfig());
break;
case 0:
default:
}
result = result && unknownFields.equals(other.unknownFields);
return result;
}
代码示例来源:origin: envoyproxy/java-control-plane
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof io.envoyproxy.envoy.api.v2.listener.Listener.ListenerFilter)) {
return super.equals(obj);
}
io.envoyproxy.envoy.api.v2.listener.Listener.ListenerFilter other = (io.envoyproxy.envoy.api.v2.listener.Listener.ListenerFilter) obj;
boolean result = true;
result = result && getName()
.equals(other.getName());
result = result && getConfigTypeCase().equals(
other.getConfigTypeCase());
if (!result) return false;
switch (configTypeCase_) {
case 2:
result = result && getConfig()
.equals(other.getConfig());
break;
case 3:
result = result && getTypedConfig()
.equals(other.getTypedConfig());
break;
case 0:
default:
}
result = result && unknownFields.equals(other.unknownFields);
return result;
}
代码示例来源:origin: envoyproxy/java-control-plane
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof io.envoyproxy.envoy.config.overload.v2alpha.Overload.ResourceMonitor)) {
return super.equals(obj);
}
io.envoyproxy.envoy.config.overload.v2alpha.Overload.ResourceMonitor other = (io.envoyproxy.envoy.config.overload.v2alpha.Overload.ResourceMonitor) obj;
boolean result = true;
result = result && getName()
.equals(other.getName());
result = result && getConfigTypeCase().equals(
other.getConfigTypeCase());
if (!result) return false;
switch (configTypeCase_) {
case 2:
result = result && getConfig()
.equals(other.getConfig());
break;
case 3:
result = result && getTypedConfig()
.equals(other.getTypedConfig());
break;
case 0:
default:
}
result = result && unknownFields.equals(other.unknownFields);
return result;
}
代码示例来源:origin: envoyproxy/java-control-plane
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof io.envoyproxy.envoy.config.metrics.v2.Stats.StatsSink)) {
return super.equals(obj);
}
io.envoyproxy.envoy.config.metrics.v2.Stats.StatsSink other = (io.envoyproxy.envoy.config.metrics.v2.Stats.StatsSink) obj;
boolean result = true;
result = result && getName()
.equals(other.getName());
result = result && getConfigTypeCase().equals(
other.getConfigTypeCase());
if (!result) return false;
switch (configTypeCase_) {
case 2:
result = result && getConfig()
.equals(other.getConfig());
break;
case 3:
result = result && getTypedConfig()
.equals(other.getTypedConfig());
break;
case 0:
default:
}
result = result && unknownFields.equals(other.unknownFields);
return result;
}
代码示例来源:origin: envoyproxy/java-control-plane
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof io.envoyproxy.envoy.api.v2.core.HealthCheckOuterClass.HealthCheck.CustomHealthCheck)) {
return super.equals(obj);
}
io.envoyproxy.envoy.api.v2.core.HealthCheckOuterClass.HealthCheck.CustomHealthCheck other = (io.envoyproxy.envoy.api.v2.core.HealthCheckOuterClass.HealthCheck.CustomHealthCheck) obj;
boolean result = true;
result = result && getName()
.equals(other.getName());
result = result && getConfigTypeCase().equals(
other.getConfigTypeCase());
if (!result) return false;
switch (configTypeCase_) {
case 2:
result = result && getConfig()
.equals(other.getConfig());
break;
case 3:
result = result && getTypedConfig()
.equals(other.getTypedConfig());
break;
case 0:
default:
}
result = result && unknownFields.equals(other.unknownFields);
return result;
}
代码示例来源:origin: envoyproxy/java-control-plane
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof io.envoyproxy.envoy.api.v2.core.GrpcServiceOuterClass.GrpcService.GoogleGrpc.CallCredentials.MetadataCredentialsFromPlugin)) {
return super.equals(obj);
}
io.envoyproxy.envoy.api.v2.core.GrpcServiceOuterClass.GrpcService.GoogleGrpc.CallCredentials.MetadataCredentialsFromPlugin other = (io.envoyproxy.envoy.api.v2.core.GrpcServiceOuterClass.GrpcService.GoogleGrpc.CallCredentials.MetadataCredentialsFromPlugin) obj;
boolean result = true;
result = result && getName()
.equals(other.getName());
result = result && getConfigTypeCase().equals(
other.getConfigTypeCase());
if (!result) return false;
switch (configTypeCase_) {
case 2:
result = result && getConfig()
.equals(other.getConfig());
break;
case 3:
result = result && getTypedConfig()
.equals(other.getTypedConfig());
break;
case 0:
default:
}
result = result && unknownFields.equals(other.unknownFields);
return result;
}
代码示例来源:origin: envoyproxy/java-control-plane
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof io.envoyproxy.envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManagerOuterClass.HttpFilter)) {
return super.equals(obj);
}
io.envoyproxy.envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManagerOuterClass.HttpFilter other = (io.envoyproxy.envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManagerOuterClass.HttpFilter) obj;
boolean result = true;
result = result && getName()
.equals(other.getName());
result = result && getConfigTypeCase().equals(
other.getConfigTypeCase());
if (!result) return false;
switch (configTypeCase_) {
case 2:
result = result && getConfig()
.equals(other.getConfig());
break;
case 4:
result = result && getTypedConfig()
.equals(other.getTypedConfig());
break;
case 0:
default:
}
result = result && unknownFields.equals(other.unknownFields);
return result;
}
代码示例来源:origin: envoyproxy/java-control-plane
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof io.envoyproxy.envoy.config.trace.v2.Trace.Tracing.Http)) {
return super.equals(obj);
}
io.envoyproxy.envoy.config.trace.v2.Trace.Tracing.Http other = (io.envoyproxy.envoy.config.trace.v2.Trace.Tracing.Http) obj;
boolean result = true;
result = result && getName()
.equals(other.getName());
result = result && getConfigTypeCase().equals(
other.getConfigTypeCase());
if (!result) return false;
switch (configTypeCase_) {
case 2:
result = result && getConfig()
.equals(other.getConfig());
break;
case 3:
result = result && getTypedConfig()
.equals(other.getTypedConfig());
break;
case 0:
default:
}
result = result && unknownFields.equals(other.unknownFields);
return result;
}
代码示例来源:origin: envoyproxy/java-control-plane
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof io.envoyproxy.envoy.api.v2.core.Base.TransportSocket)) {
return super.equals(obj);
}
io.envoyproxy.envoy.api.v2.core.Base.TransportSocket other = (io.envoyproxy.envoy.api.v2.core.Base.TransportSocket) obj;
boolean result = true;
result = result && getName()
.equals(other.getName());
result = result && getConfigTypeCase().equals(
other.getConfigTypeCase());
if (!result) return false;
switch (configTypeCase_) {
case 2:
result = result && getConfig()
.equals(other.getConfig());
break;
case 3:
result = result && getTypedConfig()
.equals(other.getTypedConfig());
break;
case 0:
default:
}
result = result && unknownFields.equals(other.unknownFields);
return result;
}
代码示例来源:origin: com.athaydes.protobuf/protobuf-tcp-rpc
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.athaydes.protobuf.tcp.api.Api.Result)) {
return super.equals(obj);
}
com.athaydes.protobuf.tcp.api.Api.Result other = (com.athaydes.protobuf.tcp.api.Api.Result) obj;
boolean result = true;
result = result && getResultCase().equals(
other.getResultCase());
if (!result) return false;
switch (resultCase_) {
case 1:
result = result && getSuccessResult()
.equals(other.getSuccessResult());
break;
case 2:
result = result && getException()
.equals(other.getException());
break;
case 0:
default:
}
return result;
}
代码示例来源:origin: chenjunwen/SpringBootFrame
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof Demo.Response)) {
return super.equals(obj);
}
Demo.Response other = (Demo.Response) obj;
boolean result = true;
result = result && command_ == other.command_;
result = result && (getSequenceId()
== other.getSequenceId());
result = result && (getStatus()
== other.getStatus());
result = result && getError()
.equals(other.getError());
result = result && (hasBody() == other.hasBody());
if (hasBody()) {
result = result && getBody()
.equals(other.getBody());
}
return result;
}
代码示例来源:origin: org.tensorflow/proto
if (hasAnyInfo()) {
result = result && getAnyInfo()
.equals(other.getAnyInfo());
代码示例来源:origin: ks-no/eventstore2
if (hasEvent()) {
result = result && getEvent()
.equals(other.getEvent());
代码示例来源:origin: com.hubspot.jackson/jackson-datatype-protobuf
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.hubspot.jackson.datatype.protobuf.util.BuiltInProtobufs.HasAny)) {
return super.equals(obj);
}
com.hubspot.jackson.datatype.protobuf.util.BuiltInProtobufs.HasAny other = (com.hubspot.jackson.datatype.protobuf.util.BuiltInProtobufs.HasAny) obj;
boolean result = true;
result = result && (hasAny() == other.hasAny());
if (hasAny()) {
result = result && getAny()
.equals(other.getAny());
}
return result;
}
内容来源于网络,如有侵权,请联系作者删除!