Move AbstractIetfYangUtil
[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
12 /**
13  * Utility methods for working with types defined in ietf-yang-types.
14  */
15 @Beta
16 public final class IetfYangUtil extends AbstractIetfYangUtil<MacAddress, PhysAddress, HexString, DottedQuad, Uuid> {
17     public static final IetfYangUtil INSTANCE = new IetfYangUtil();
18
19     private IetfYangUtil() {
20         super(MacAddress.class, PhysAddress.class, HexString.class, DottedQuad.class, Uuid.class);
21     }
22
23     @Override
24     protected String getValue(final MacAddress macAddress) {
25         return macAddress.getValue();
26     }
27
28     @Override
29     protected String getPhysValue(final PhysAddress physAddress) {
30         return physAddress.getValue();
31     }
32
33     @Override
34     protected String getHexValue(final HexString hexString) {
35         return hexString.getValue();
36     }
37
38     @Override
39     protected String getQuadValue(final DottedQuad dottedQuad) {
40         return dottedQuad.getValue();
41     }
42 }