2 * Copyright (c) 2020 PANTHEON.tech, s.r.o. and others. All rights reserved.
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
8 package org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.te.types.rev200610;
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;
13 public class TeTpIdBuilder {
14 private TeTpIdBuilder() {
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));