@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NODEID_FIELD_NUMBER; hash = (53 * hash) + getNodeId(); hash = (37 * hash) + HOST_FIELD_NUMBER; hash = (53 * hash) + getHost().hashCode(); hash = (37 * hash) + PORT_FIELD_NUMBER; hash = (53 * hash) + getPort(); if (getPartitionsCount() > 0) { hash = (37 * hash) + PARTITIONS_FIELD_NUMBER; hash = (53 * hash) + getPartitionsList().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
public BrokerInfoImpl(final GatewayOuterClass.BrokerInfo broker) { this.nodeId = broker.getNodeId(); this.host = broker.getHost(); this.port = broker.getPort(); this.partitions = new ArrayList<>(); for (final GatewayOuterClass.Partition partition : broker.getPartitionsList()) { this.partitions.add(new PartitionInfoImpl(partition)); } }
public BrokerInfoImpl(final GatewayOuterClass.BrokerInfo broker) { this.nodeId = broker.getNodeId(); this.host = broker.getHost(); this.port = broker.getPort(); this.partitions = new ArrayList<>(); for (final GatewayOuterClass.Partition partition : broker.getPartitionsList()) { this.partitions.add(new PartitionInfoImpl(partition)); } }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof io.zeebe.gateway.protocol.GatewayOuterClass.BrokerInfo)) { return super.equals(obj); } io.zeebe.gateway.protocol.GatewayOuterClass.BrokerInfo other = (io.zeebe.gateway.protocol.GatewayOuterClass.BrokerInfo) obj; boolean result = true; result = result && (getNodeId() == other.getNodeId()); result = result && getHost() .equals(other.getHost()); result = result && (getPort() == other.getPort()); result = result && getPartitionsList() .equals(other.getPartitionsList()); result = result && unknownFields.equals(other.unknownFields); return result; }