blob: 3b71d95d6777e9537ccb994d469a286031af7394 [file] [log] [blame]
Yuta HIGUCHI39ede6a2014-10-03 15:23:33 -07001package org.onlab.onos.net;
2
3public final class AnnotationsUtil {
4
5 public static boolean isEqual(Annotations lhs, Annotations rhs) {
6 if (lhs == rhs) {
7 return true;
8 }
9 if (lhs == null || rhs == null) {
10 return false;
11 }
12
13 if (!lhs.keys().equals(rhs.keys())) {
14 return false;
15 }
16
17 for (String key : lhs.keys()) {
18 if (!lhs.value(key).equals(rhs.value(key))) {
19 return false;
20 }
21 }
22 return true;
23 }
24
25 // not to be instantiated
26 private AnnotationsUtil() {}
27}