M
- mac-address typeP
- phys-address type@Beta public abstract class AbstractIetfYangUtil<M,P> extends Object
Modifier | Constructor and Description |
---|---|
protected |
AbstractIetfYangUtil(Class<M> macClass,
Class<P> physClass) |
Modifier and Type | Method and Description |
---|---|
byte[] |
bytesFor(M macAddress) |
M |
canonizeMacAddress(M macAddress)
Convert the value of a MacAddress into the canonical representation.
|
P |
canonizePhysAddress(P physAddress)
Convert the value of a PhysAddress into the canonical representation.
|
protected abstract String |
getPhysValue(P physAddress) |
protected abstract String |
getValue(M macAddress) |
M |
macAddressFor(byte[] bytes)
Create a MacAddress object holding the canonical representation of the 6 bytes
passed in as argument.
|
P |
physAddressFor(byte[] bytes)
Create a PhysAddress object holding the canonical representation of the bytes passed in as argument.
|
public final M canonizeMacAddress(M macAddress)
macAddress
- Input MAC addressNullPointerException
- if macAddress is nullpublic final M macAddressFor(byte[] bytes)
bytes
- 6-byte input arrayNullPointerException
- if bytes is nullIllegalArgumentException
- if length of input is not 6 bytespublic final P canonizePhysAddress(P physAddress)
physAddress
- Input MAC addressNullPointerException
- if physAddress is nullpublic final P physAddressFor(byte[] bytes)
bytes
- input arrayNullPointerException
- if bytes is nullIllegalArgumentException
- if length of input is not at least 1 bytepublic final byte[] bytesFor(M macAddress)
Copyright © 2019 OpenDaylight. All rights reserved.