Bump versions to 10.0.0-SNAPSHOT
[mdsal.git] / binding / mdsal-binding-test-model / src / main / java / org / opendaylight / yang / gen / v1 / urn / opendaylight / params / xml / ns / yang / yangtools / test / union / rev150121 / UnionTestTypeBuilder.java
1 /*
2  * Copyright (c) 2015 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8
9 package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.yangtools.test.union.rev150121;
10
11 /**
12  * The purpose of generated class in src/main/java for Union types is to create new instances of unions from a string representation.
13  * In some cases it is very difficult to automate it since there can be unions such as (uint32 - uint16), or (string - uint32).
14  * 
15  * The reason behind putting it under src/main/java is:
16  * 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
17  * loss of user code.
18  * 
19  */
20 public class UnionTestTypeBuilder {
21
22     public static UnionTestType getDefaultInstance(java.lang.String defaultValue) {
23         if (defaultValue.length() > 8) {
24             return new UnionTestType(new LowestLevel1(defaultValue));
25         } else {
26             return new UnionTestType(new LowestLevel2(defaultValue));
27         }
28     }
29
30 }