Fix checkstyle whitespace issues - WHITESPACE ONLY
Change-Id: Ic205c1afd639c6008d61d9de95cb764eeb6238ca
diff --git a/src/main/java/net/onrc/onos/core/topology/DeviceEvent.java b/src/main/java/net/onrc/onos/core/topology/DeviceEvent.java
index f7331a0..48d50e4 100644
--- a/src/main/java/net/onrc/onos/core/topology/DeviceEvent.java
+++ b/src/main/java/net/onrc/onos/core/topology/DeviceEvent.java
@@ -12,16 +12,15 @@
/**
* Self-contained Device event(s) Object
- *
+ * <p/>
* Device event differ from other events.
* Device Event represent add/remove of attachmentPoint or ipAddress.
* Not add/remove of the DeviceObject itself.
- *
+ * <p/>
* Multiple attachmentPoints can be specified to batch events into 1 object.
* Each should be treated as independent events.
- *
+ * <p/>
* TODO: We probably want common base class/interface for Self-Contained Event Object
- *
*/
public class DeviceEvent {
private final MACAddress mac;
@@ -34,24 +33,24 @@
*/
@Deprecated
public DeviceEvent() {
- mac = null;
+ mac = null;
}
public DeviceEvent(MACAddress mac) {
- if (mac == null) {
- throw new IllegalArgumentException("Device mac cannot be null");
- }
- this.mac = mac;
- this.attachmentPoints = new LinkedList<>();
- this.ipAddresses = new HashSet<>();
+ if (mac == null) {
+ throw new IllegalArgumentException("Device mac cannot be null");
+ }
+ this.mac = mac;
+ this.attachmentPoints = new LinkedList<>();
+ this.ipAddresses = new HashSet<>();
}
public MACAddress getMac() {
- return mac;
+ return mac;
}
public List<SwitchPort> getAttachmentPoints() {
- return attachmentPoints;
+ return attachmentPoints;
}
public Set<InetAddress> getIpAddresses() {
@@ -59,46 +58,46 @@
}
public void setAttachmentPoints(List<SwitchPort> attachmentPoints) {
- this.attachmentPoints = attachmentPoints;
+ this.attachmentPoints = attachmentPoints;
}
public void addAttachmentPoint(SwitchPort attachmentPoint) {
- // may need to maintain uniqness
- this.attachmentPoints.add(0, attachmentPoint);
+ // may need to maintain uniqness
+ this.attachmentPoints.add(0, attachmentPoint);
}
public boolean addIpAddress(InetAddress addr) {
- return this.ipAddresses.add(addr);
+ return this.ipAddresses.add(addr);
}
public boolean removeIpAddress(InetAddress addr) {
- return this.ipAddresses.remove(addr);
+ return this.ipAddresses.remove(addr);
}
@Override
public String toString() {
- return "[DeviceEvent " + mac + " attachmentPoints:" + attachmentPoints + " ipAddr:" + ipAddresses + "]";
+ return "[DeviceEvent " + mac + " attachmentPoints:" + attachmentPoints + " ipAddr:" + ipAddresses + "]";
}
// Assuming mac is unique cluster-wide
public static ByteBuffer getDeviceID(final byte[] mac) {
- return (ByteBuffer) ByteBuffer.allocate(2 + mac.length).putChar('D').put(mac).flip();
+ return (ByteBuffer) ByteBuffer.allocate(2 + mac.length).putChar('D').put(mac).flip();
}
public byte[] getID() {
- return getDeviceID(mac.toBytes()).array();
+ return getDeviceID(mac.toBytes()).array();
}
public ByteBuffer getIDasByteBuffer() {
- return getDeviceID(mac.toBytes());
+ return getDeviceID(mac.toBytes());
}
- public long getLastSeenTime() {
- return lastSeenTime;
- }
+ public long getLastSeenTime() {
+ return lastSeenTime;
+ }
- public void setLastSeenTime(long lastSeenTime) {
- this.lastSeenTime = lastSeenTime;
- }
+ public void setLastSeenTime(long lastSeenTime) {
+ this.lastSeenTime = lastSeenTime;
+ }
}