You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by sr...@apache.org on 2018/06/07 14:50:34 UTC
[incubator-plc4x] 01/06: added toString(),
equals() and hashCode() to PlcRequestContainer
This is an automated email from the ASF dual-hosted git repository.
sruehl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-plc4x.git
commit 87cf9d0995999b133e53f12d64fe8c381ad28e3e
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Thu Jun 7 09:16:57 2018 +0200
added toString(), equals() and hashCode() to PlcRequestContainer
---
.../java/api/messages/PlcRequestContainer.java | 24 ++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/plc4j/api/src/main/java/org/apache/plc4x/java/api/messages/PlcRequestContainer.java b/plc4j/api/src/main/java/org/apache/plc4x/java/api/messages/PlcRequestContainer.java
index 6443c36..4168246 100644
--- a/plc4j/api/src/main/java/org/apache/plc4x/java/api/messages/PlcRequestContainer.java
+++ b/plc4j/api/src/main/java/org/apache/plc4x/java/api/messages/PlcRequestContainer.java
@@ -51,4 +51,28 @@ public class PlcRequestContainer<T extends PlcRequest, R extends PlcResponse> im
return null;
}
+ @Override
+ public String toString() {
+ return "PlcRequestContainer{" +
+ "request=" + request +
+ '}';
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (!(o instanceof PlcRequestContainer)) {
+ return false;
+ }
+ PlcRequestContainer<?, ?> that = (PlcRequestContainer<?, ?>) o;
+ return Objects.equals(request, that.request) &&
+ Objects.equals(responseFuture, that.responseFuture);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(request, responseFuture);
+ }
}
--
To stop receiving notification emails like this one, please contact
sruehl@apache.org.