|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.floodlightcontroller.util.MACAddress
public class MACAddress
The class representing MAC address.
| Field Summary | |
|---|---|
static int |
MAC_ADDRESS_LENGTH
|
| Constructor Summary | |
|---|---|
MACAddress(byte[] address)
|
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object o)
|
int |
hashCode()
|
boolean |
isBroadcast()
Returns true if the MAC address is the broadcast address. |
boolean |
isMulticast()
Returns true if the MAC address is the multicast address. |
int |
length()
Returns the length of the MACAddress. |
byte[] |
toBytes()
Returns the value of the MACAddress as a byte array. |
long |
toLong()
Returns the value of the MACAddress as a long. |
java.lang.String |
toString()
|
static MACAddress |
valueOf(byte[] address)
Returns a MAC address instance representing the specified byte array. |
static MACAddress |
valueOf(long address)
Returns a MAC address instance representing the specified long value. |
static MACAddress |
valueOf(java.lang.String address)
Returns a MAC address instance representing the value of the specified String. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int MAC_ADDRESS_LENGTH
| Constructor Detail |
|---|
public MACAddress(byte[] address)
| Method Detail |
|---|
public static MACAddress valueOf(java.lang.String address)
String.
address - the String representation of the MAC Address to be parsed.
String.
java.lang.IllegalArgumentException - if the string cannot be parsed as a MAC address.public static MACAddress valueOf(byte[] address)
byte array.
address - the byte array to be parsed.
byte array.
java.lang.IllegalArgumentException - if the byte array cannot be parsed as a MAC address.public static MACAddress valueOf(long address)
long value.
The lower 48 bits of the long value are used to parse as a MAC address.
address - the long value to be parsed. The lower 48 bits are used for a MAC address.
long value.
java.lang.IllegalArgumentException - if the long value cannot be parsed as a MAC address.public int length()
MACAddress.
MACAddress.public byte[] toBytes()
MACAddress as a byte array.
byte array.public long toLong()
MACAddress as a long.
long.public boolean isBroadcast()
true if the MAC address is the broadcast address.
true if the MAC address is the broadcast address.public boolean isMulticast()
true if the MAC address is the multicast address.
true if the MAC address is the multicast address.public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||