Add HexString/DottedQuad/Uuid support to IetfYangUtil
[mdsal.git] / model / ietf / rfc6991-ietf-yang-types / src / main / java / org / opendaylight / yang / gen / v1 / urn / ietf / params / xml / ns / yang / ietf / yang / types / rev130715 / IetfYangUtil.java
1 /*
2  * Copyright (c) 2016 Pantheon Technologies 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.yang.types.rev130715;
9
10 import com.google.common.annotations.Beta;
11 import org.opendaylight.mdsal.model.ietf.util.AbstractIetfYangUtil;
12
13 /**
14  * Utility methods for working with types defined in ietf-yang-types.
15  */
16 @Beta
17 public final class IetfYangUtil extends AbstractIetfYangUtil<MacAddress, PhysAddress, HexString, DottedQuad, Uuid> {
18     public static final IetfYangUtil INSTANCE = new IetfYangUtil();
19
20     private IetfYangUtil() {
21         super(MacAddress.class, PhysAddress.class, HexString.class, DottedQuad.class, Uuid.class);
22     }
23
24     @Override
25     protected String getValue(final MacAddress macAddress) {
26         return macAddress.getValue();
27     }
28
29     @Override
30     protected String getPhysValue(final PhysAddress physAddress) {
31         return physAddress.getValue();
32     }
33
34     @Override
35     protected String getHexValue(final HexString hexString) {
36         return hexString.getValue();
37     }
38
39     @Override
40     protected String getQuadValue(final DottedQuad dottedQuad) {
41         return dottedQuad.getValue();
42     }
43 }