Bump versions to 10.0.0-SNAPSHOT
[mdsal.git] / model / ietf / rfc8776-ietf-te-types / src / main / java / org / opendaylight / yang / gen / v1 / urn / ietf / params / xml / ns / yang / ietf / te / types / rev200610 / TeTpIdBuilder.java
1 /*
2  * Copyright (c) 2020 PANTHEON.tech, s.r.o. 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 package org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.te.types.rev200610;
9
10 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddressBuilder;
11 import org.opendaylight.yangtools.yang.common.Uint32;
12
13 public class TeTpIdBuilder {
14     private TeTpIdBuilder() {
15         // Hidden on purpose
16     }
17
18     public static TeTpId getDefaultInstance(final String defaultValue) {
19         return defaultValue.indexOf('.') == -1 && defaultValue.indexOf(':') == -1
20                 ? new TeTpId(Uint32.valueOf(defaultValue))
21                         : new TeTpId(IpAddressBuilder.getDefaultInstance(defaultValue));
22     }
23 }