Merge "Re-added config.version to config-module-archetype."
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / messages / PrimaryFound.java
1 /*
2  * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8
9 package org.opendaylight.controller.cluster.datastore.messages;
10
11 public class PrimaryFound {
12   private final String primaryPath;
13
14   public PrimaryFound(String primaryPath) {
15     this.primaryPath = primaryPath;
16   }
17
18   public String getPrimaryPath() {
19     return primaryPath;
20   }
21
22   @Override
23   public boolean equals(Object o) {
24     if (this == o) return true;
25     if (o == null || getClass() != o.getClass()) return false;
26
27     PrimaryFound that = (PrimaryFound) o;
28
29     if (!primaryPath.equals(that.primaryPath)) return false;
30
31     return true;
32   }
33
34   @Override
35   public int hashCode() {
36     return primaryPath.hashCode();
37   }
38
39   @Override
40   public String toString() {
41     return "PrimaryFound{" +
42             "primaryPath='" + primaryPath + '\'' +
43             '}';
44   }
45
46
47 }