3 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
5 * This program and the accompanying materials are made available under the
6 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
7 * and is available at http://www.eclipse.org/legal/epl-v10.html
10 package org.opendaylight.controller.clustering.test.internal;
12 import java.io.Serializable;
14 public class StringContainer implements Serializable {
15 private String mystring;
17 public StringContainer() {
21 public StringContainer(String s) {
25 public String getMystring() {
29 public void setMystring(String mystring) {
30 this.mystring = mystring;
33 // Return the hashCode of the containing string
35 public int hashCode() {
36 if (this.mystring != null) {
37 return this.mystring.hashCode();
43 public boolean equals(Object obj) {
44 if (obj instanceof StringContainer) {
45 StringContainer o = (StringContainer) obj;
46 return this.mystring.equals(o.getMystring());
52 public String toString() {
53 return "{" + this.mystring + "}";