Add HexString/DottedQuad/Uuid support to IetfYangUtil
[mdsal.git] / model / ietf / ietf-type-util / src / test / java / org / opendaylight / mdsal / model / ietf / util / MacUtil.java
1 /*
2  * Copyright (c) 2016 Cisco Systems, Inc. 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.mdsal.model.ietf.util;
9
10 final class MacUtil extends AbstractIetfYangUtil<MacClass, PhysClass, HexClass, QuadClass, UuidClass> {
11     MacUtil() {
12         super(MacClass.class, PhysClass.class, HexClass.class, QuadClass.class, UuidClass.class);
13     }
14
15     @Override
16     protected String getValue(final MacClass macAddress) {
17         return macAddress.getValue();
18     }
19
20     @Override
21     protected String getPhysValue(final PhysClass physAddress) {
22         return physAddress.getValue();
23     }
24
25     @Override
26     protected String getHexValue(final HexClass hexString) {
27         return hexString.getValue();
28     }
29
30     @Override
31     protected String getQuadValue(final QuadClass dottedQuad) {
32         return dottedQuad.getValue();
33     }
34 }