e9304e29151ce999b90698049c567ee276ddc9e4
[hc2vpp.git] /
1 package org.opendaylight.yang.gen.v1.urn.ieee.params.xml.ns.yang.dot1q.types.rev150626.dot1q.tag.or.any;
2
3 import org.opendaylight.yang.gen.v1.urn.ieee.params.xml.ns.yang.dot1q.types.rev150626.Dot1qVlanId;
4 import org.opendaylight.yang.gen.v1.urn.ieee.params.xml.ns.yang.dot1q.types.rev150626.dot1q.tag.or.any.Dot1qTag.VlanId;
5
6
7 /**
8  * The purpose of generated class in src/main/java for Union types is to create new instances of unions from a string representation.
9  * In some cases it is very difficult to automate it since there can be unions such as (uint32 - uint16), or (string - uint32).
10  *
11  * The reason behind putting it under src/main/java is:
12  * This class is generated in form of a stub and needs to be finished by the user. This class is generated only once to prevent
13  * loss of user code.
14  *
15  */
16 public class Dot1qTagVlanIdBuilder {
17
18     private final static String ANY = "any";
19
20     public static VlanId getDefaultInstance(java.lang.String defaultValue) {
21         if (ANY.equals(defaultValue)) {
22             return new VlanId(VlanId.Enumeration.Any);
23         } else {
24             return new VlanId(new Dot1qVlanId(Integer.valueOf(defaultValue)));
25         }
26     }
27
28 }