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 static final long serialVersionUID = 1L;
16 private String mystring;
18 public StringContainer() {
22 public StringContainer(String s) {
26 public String getMystring() {
30 public void setMystring(String mystring) {
31 this.mystring = mystring;
34 // Return the hashCode of the containing string
36 public int hashCode() {
37 if (this.mystring != null) {
38 return this.mystring.hashCode();
44 public boolean equals(Object obj) {
45 if (obj instanceof StringContainer) {
46 StringContainer o = (StringContainer) obj;
47 return this.mystring.equals(o.getMystring());
53 public String toString() {
54 return "{" + this.mystring + "}";