package org.opendaylight.yang.gen.v1.urn.ieee.params.xml.ns.yang.dot1q.types.rev150626.dot1q.tag.or.any; import org.opendaylight.yang.gen.v1.urn.ieee.params.xml.ns.yang.dot1q.types.rev150626.Dot1qVlanId; import org.opendaylight.yang.gen.v1.urn.ieee.params.xml.ns.yang.dot1q.types.rev150626.dot1q.tag.or.any.Dot1qTag.VlanId; /** * The purpose of generated class in src/main/java for Union types is to create new instances of unions from a string representation. * In some cases it is very difficult to automate it since there can be unions such as (uint32 - uint16), or (string - uint32). * * The reason behind putting it under src/main/java is: * 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 * loss of user code. * */ public class Dot1qTagVlanIdBuilder { private final static String ANY = "any"; public static VlanId getDefaultInstance(java.lang.String defaultValue) { if (ANY.equals(defaultValue)) { return new VlanId(VlanId.Enumeration.Any); } else { return new VlanId(new Dot1qVlanId(Integer.valueOf(defaultValue))); } } }