1 package org.opendaylight.yang.gen.v1.bug5446.rev151105;
4 * The purpose of generated class in src/main/java for Union types is to create new instances of unions from a string representation.
5 * In some cases it is very difficult to automate it since there can be unions such as (uint32 - uint16), or (string - uint32).
7 * The reason behind putting it under src/main/java is:
8 * 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
12 public class IpAddressBinaryBuilder {
13 public static IpAddressBinary getDefaultInstance(java.lang.String defaultValue) {
14 return new IpAddressBinary(Ipv4AddressBinary.getDefaultInstance(defaultValue));
17 public static IpAddressBinary getDefaultInstance(byte[] defaultValue) {
18 if (defaultValue.length == 4) {
19 return new IpAddressBinary(new Ipv4AddressBinary(defaultValue));
20 } else if (defaultValue.length == 16) {
21 return new IpAddressBinary(new Ipv6AddressBinary(defaultValue));