A race condition occurs between ARPHandler and HostTracker if the ARP
[controller.git] / opendaylight / sal / yang-prototype / yang / yang-data-impl / src / main / java / org / opendaylight / controller / yang / data / impl / SimpleNodeTOImpl.java
1 /*\r
2  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.\r
3  *\r
4  * This program and the accompanying materials are made available under the\r
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
6  * and is available at http://www.eclipse.org/legal/epl-v10.html\r
7  */\r
8 package org.opendaylight.controller.yang.data.impl;\r
9 \r
10 import org.opendaylight.controller.yang.common.QName;\r
11 import org.opendaylight.controller.yang.data.api.CompositeNode;\r
12 import org.opendaylight.controller.yang.data.api.ModifyAction;\r
13 import org.opendaylight.controller.yang.data.api.MutableSimpleNode;\r
14 import org.opendaylight.controller.yang.data.api.SimpleNode;\r
15 \r
16 /**\r
17  * @author michal.rehak\r
18  * @param <T> type of simple node value\r
19  * \r
20  */\r
21 public class SimpleNodeTOImpl<T> extends AbstractNodeTO<T> implements\r
22         SimpleNode<T> {\r
23 \r
24     /**\r
25      * @param qname\r
26      * @param parent\r
27      * @param value\r
28      */\r
29     public SimpleNodeTOImpl(QName qname, CompositeNode parent, T value) {\r
30         super(qname, parent, value);\r
31     }\r
32     \r
33     /**\r
34      * @param qname\r
35      * @param parent\r
36      * @param value\r
37      * @param modifyAction \r
38      */\r
39     public SimpleNodeTOImpl(QName qname, CompositeNode parent, T value, ModifyAction modifyAction) {\r
40         super(qname, parent, value, modifyAction);\r
41     }\r
42 \r
43     \r
44     @Override\r
45     public MutableSimpleNode<T> asMutable() {\r
46         throw new IllegalAccessError("cast to mutable is not supported - "+getClass().getSimpleName());\r
47     }\r
48     \r
49     @Override\r
50     public String toString() {\r
51         return super.toString() + ", value = "+getValue();\r
52     }\r
53 }\r