BUG-704 Remove pax from netconf identity-ref test.
[controller.git] / opendaylight / clustering / test / src / main / java / org / opendaylight / controller / clustering / test / internal / ComplexContainer.java
1
2 /*
3  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
4  *
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
8  */
9
10 package org.opendaylight.controller.clustering.test.internal;
11
12 import java.io.Serializable;
13
14 public class ComplexContainer implements Serializable {
15     private IComplex f;
16     private IComplex f1;
17     private Integer state;
18
19     public ComplexContainer(String i, Integer s) {
20         this.state = s;
21         this.f = new ComplexClass(i);
22         this.f1 = new ComplexClass1(i);
23     }
24
25     public String getIdentity() {
26         if (this.f != null && this.f1 != null) {
27             return ("[" + f.whoAmI() + "]-[" + f1.whoAmI() + "]");
28         }
29         return "<NOTSET>";
30     }
31
32     public void setIdentity(String i) {
33         if (this.f != null) {
34             this.f.IAm(i);
35         }
36         if (this.f1 != null) {
37             this.f1.IAm(i);
38         }
39     }
40
41     public Integer getState() {
42         return this.state;
43     }
44
45     @Override
46     public String toString() {
47         return ("{ID:" + this.getIdentity() + ",STATE:" + this.state + "}");
48     }
49 }