java.lang.Object
com.aoapps.net.MacAddress
- All Implemented Interfaces:
DtoFactory<MacAddress>
,Internable<MacAddress>
,Serializable
,Comparable<MacAddress>
public final class MacAddress
extends Object
implements Comparable<MacAddress>, Serializable, DtoFactory<MacAddress>, Internable<MacAddress>
Represents a 48-bit MAC address in HH:HH:HH:HH:HH:HH format. Parses case insensitive, produces uppercase.
- Author:
- AO Industries, Inc.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionint
compareTo
(MacAddress other) boolean
getDto()
int
hashCode()
intern()
Interns this IP much in the same fashion asString.intern()
.boolean
toString()
static ValidationResult
Checks if the address is valid.static MacAddress
-
Method Details
-
validate
Checks if the address is valid. -
valueOf
- Parameters:
address
- whennull
, returnsnull
- Throws:
ValidationException
-
equals
-
hashCode
public int hashCode() -
compareTo
- Specified by:
compareTo
in interfaceComparable<MacAddress>
-
toString
-
intern
Interns this IP much in the same fashion asString.intern()
.- Specified by:
intern
in interfaceInternable<MacAddress>
- See Also:
-
getDto
- Specified by:
getDto
in interfaceDtoFactory<MacAddress>
-
isBroadcast
public boolean isBroadcast()
-