public class ControlledEntityModel extends Object implements ControlledEntity, Comparable<ControlledEntityModel>
Constructor and Description |
---|
ControlledEntityModel(IpAddress ipp)
Creates a Controlled Entity based on just ip Address.
|
ControlledEntityModel(IpAddress ipp,
MacAddress mc)
Creates a ControledEntity instance.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(ControlledEntityModel other) |
boolean |
equals(Object obj) |
int |
hashCode()
Depends on the ipAddress hashcode.
|
IpAddress |
ip()
Returns the ip.
|
MacAddress |
mac()
Returns the mac.
|
void |
setIpAddress(IpAddress ipAddress)
Assigns the given ip to this controlled entity.
|
void |
setMacAddress(MacAddress macAddress)
Assigns the given mac to this controlled entity.
|
String |
toString() |
public ControlledEntityModel(IpAddress ipp)
ipp
- ip address of the controlled entitypublic ControlledEntityModel(IpAddress ipp, MacAddress mc)
ipp
- ip address of the controlled entitymc
- mac address ofhte controller entitypublic IpAddress ip()
ip
in interface ControlledEntity
public MacAddress mac()
mac
in interface ControlledEntity
public void setMacAddress(MacAddress macAddress)
macAddress
- the macAddress to setpublic void setIpAddress(IpAddress ipAddress)
ipAddress
- the ipAddress to setpublic int hashCode()
public boolean equals(Object obj)
This implementation bases equality on the IP address only.
public int compareTo(ControlledEntityModel other)
compareTo
in interface Comparable<ControlledEntityModel>
Copyright © 2015. All Rights Reserved.