diff options
author | Øyvind Grønnesby <oyving@verizonmedia.com> | 2020-11-08 14:52:09 +0100 |
---|---|---|
committer | Øyvind Grønnesby <oyving@verizonmedia.com> | 2020-11-08 14:52:09 +0100 |
commit | 4f411eb3206bf20878aee30cb12afac178fc7089 (patch) | |
tree | bdd40fcf91c4772647095c156623263bac50af91 | |
parent | f17dee5bcf1fc4dbf6138f7d4c654d5833da6193 (diff) |
toString, equals, and hashCode
-rw-r--r-- | controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/billing/CollectionResult.java | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/billing/CollectionResult.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/billing/CollectionResult.java index d2eb77ba94c..4322cdc81b3 100644 --- a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/billing/CollectionResult.java +++ b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/billing/CollectionResult.java @@ -1,6 +1,7 @@ // Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.vespa.hosted.controller.api.integration.billing; +import java.util.Objects; import java.util.Optional; /** @@ -31,4 +32,24 @@ public class CollectionResult { public Optional<String> getErrorMessage() { return errorMessage; } + + @Override + public String toString() { + return "CollectionResult{" + + "errorMessage=" + errorMessage + + '}'; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + CollectionResult that = (CollectionResult) o; + return Objects.equals(errorMessage, that.errorMessage); + } + + @Override + public int hashCode() { + return Objects.hash(errorMessage); + } }
\ No newline at end of file |