Fix of port-number model
[openflowplugin.git] / model / model-flow-base / src / main / java / org / opendaylight / yang / gen / v1 / urn / opendaylight / flow / types / port / rev130925 / PortNumberUniBuilder.java
1 package org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.port.rev130925;
2
3
4 /**
5  * The purpose of generated class in src/main/java for Union types is to create new instances of unions from a string representation.
6  * In some cases it is very difficult to automate it since there can be unions such as (uint32 - uint16), or (string - uint32).
7  *
8  * The reason behind putting it under src/main/java is:
9  * 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
10  * loss of user code.
11  *
12  */
13 public class PortNumberUniBuilder {
14
15     public static PortNumberUni getDefaultInstance(java.lang.String defaultValue) {
16         try {
17             long uint32 = Long.parseLong(defaultValue);
18             return new PortNumberUni(uint32);
19         } catch(NumberFormatException e){
20             return new PortNumberUni(defaultValue);
21         }
22     }
23
24 }