2 * Copyright (c) 2016 Pantheon Technologies 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.inet.types.rev100924;
10 import com.google.common.annotations.Beta;
11 import org.opendaylight.mdsal.model.ietf.util.AbstractIetfInetUtil;
14 * A set of utility methods to efficiently instantiate various ietf-inet-types DTOs.
17 public final class IetfInetUtil extends AbstractIetfInetUtil<Ipv4Address, Ipv4Prefix, Ipv6Address, Ipv6Prefix, IpAddress> {
18 public static final IetfInetUtil INSTANCE = new IetfInetUtil();
20 private IetfInetUtil() {
21 super(Ipv4Address.class, Ipv4Prefix.class, Ipv6Address.class, Ipv6Prefix.class);
25 protected IpAddress ipv4Address(final Ipv4Address addr) {
26 return new IpAddress(addr);
30 protected IpAddress ipv6Address(final Ipv6Address addr) {
31 return new IpAddress(addr);
35 protected String ipv4AddressString(final Ipv4Address addr) {
36 return addr.getValue();
40 protected String ipv6AddressString(final Ipv6Address addr) {
41 return addr.getValue();
45 protected String ipv4PrefixString(final Ipv4Prefix prefix) {
46 return prefix.getValue();
50 protected String ipv6PrefixString(final Ipv6Prefix prefix) {
51 return prefix.getValue();