dd37bbe84cc4c025f95896702b8886c1de7d8b09
[honeycomb.git] / v3po / api / src / main / java / org / opendaylight / yang / gen / v1 / urn / opendaylight / params / xml / ns / yang / vpp / classifier / rev150603 / VppNodeBuilder.java
1 package org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.classifier.rev150603;
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 VppNodeBuilder {
14
15     public static VppNode getDefaultInstance(java.lang.String defaultValue) {
16         if (PacketHandlingAction.Deny.toString().equalsIgnoreCase(defaultValue)) {
17             return new VppNode(PacketHandlingAction.Deny);
18         } else if (PacketHandlingAction.Permit.toString().equalsIgnoreCase(defaultValue)) {
19             return new VppNode(PacketHandlingAction.Permit);
20         } else {
21             throw new IllegalArgumentException(String.format("Could not parse VppNode: %s", defaultValue));
22         }
23     }
24
25 }