commit | 8098405e79b6d72887dbbd3e0a1d69e9b734f7fd | [log] [tgz] |
---|---|---|
author | Madan Jampani <madan@onlab.us> | Thu Jul 23 13:11:36 2015 -0700 |
committer | Madan Jampani <madan@onlab.us> | Thu Jul 23 13:45:44 2015 -0700 |
tree | 9d79ea2fca443048b14811c31b16feb077e45119 | |
parent | d083bc41d17d3dc23648091605c98c2cf1dbb493 [diff] |
Added unit test for Match and UpdateResult + Javadoc fixes Change-Id: I8dae6c9568d33d580d60a72fdcc1be45b7308727
diff --git a/core/store/dist/src/main/java/org/onosproject/store/consistent/impl/Match.java b/core/store/dist/src/main/java/org/onosproject/store/consistent/impl/Match.java index 093e02c..804514c 100644 --- a/core/store/dist/src/main/java/org/onosproject/store/consistent/impl/Match.java +++ b/core/store/dist/src/main/java/org/onosproject/store/consistent/impl/Match.java
@@ -104,6 +104,21 @@ } @Override + public int hashCode() { + return Objects.hash(matchAny, value); + } + + @Override + public boolean equals(Object other) { + if (!(other instanceof Match)) { + return false; + } + Match<T> that = (Match) other; + return Objects.equals(this.matchAny, that.matchAny) && + Objects.equals(this.value, that.value); + } + + @Override public String toString() { return toStringHelper(this) .add("matchAny", matchAny)